-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Writing C# modules unlocks a lot of functionality in Renode, however it's very difficult to debug these modules.
For example, in this module:
using System;
using Antmicro.Renode.Core;
using Antmicro.Renode.Peripherals.Bus;
using Antmicro.Renode.Time;
using Antmicro.Renode.Logging;
using System.Threading;
namespace Antmicro.Renode.Peripherals.Timers
{
public class SimpleTicker : IDoubleWordPeripheral
{
public SimpleTicker(ulong periodInMs, Machine machine)
{
machine.ClockSource.AddClockEntry(new ClockEntry(periodInMs, ClockEntry.FrequencyToRatio(this, 1000), OnTick, this, String.Empty));
}
// ...
}
}It's difficult to know:
- What properties there are on
machine - Where
Machineis defined (which package does it come from?) - What do each of the parameters in that function mean?
- What is a
ClockSourceand how does it work? - What other properties are there in
Antmicro.Renode.Peripherals? - What is the interface required to implement
IDoubleWordPeripheral? - Does this even compile?
Many of these questions could be answered by connecting this .cs file to an IDE of some sort. I'm not sure how 2 could be answered, because I gather that's a feature of C#. 7 can only be answered by restarting Renode.
With C# modules being documented, it would also be nice to know how to implement modules and debug issues within them.
Metadata
Metadata
Assignees
Labels
No labels