-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
task execution capability #58
Comments
There's no way to do that so elegantly I'm afraid. So even with the DPI you would need to create a C wrapper, but you could also create a Verilog wrapper and use that with existing Origen Sim. reg call_my_task;
reg [15:0] my_task_arg;
always @ posedge call_my_task {
#my_task(my_task_arg);
} I haven't written RTL in a while and I forget if you can pass args to tasks like that, hopefully you can. Then in your Origen code you could do: def call_my_func(my_arg)
tester.poke "my_task_arg", my_arg
tester.poke "call_my_task", 0
tester.poke "call_my_task", 1
end
call_my_func(0x55) I would put the Verilog wrappers in their own file and include that into the Origen Sim build, I forget how but I'm sure Origen Sim supports that already. You can imagine if you had a list of task signatures (like a header file) you could create a script to automatically generate the Verilog and Ruby wrappers for them. @coreyeng may have other thoughts/experience on this... |
I have on my to-do list to add this to O2's version. Essentially, it'd work like CATI where there's known functions built in and signals are toggled to kick off the commands. In the meantime, you can build a task in with an always block to repeatedly monitor a signal and poke that signal (poking arg values beforehand) and launch that way. The only downside is the tasks must be compiled in during the snapshot build. No adding tasks dynamically. The DPI had the illusion of that but I when I looked further into it, it still needed to be compiled at the outset. It was closer to linking a static library than what it let on (at least back in 2017 when I was looking into it and discussing solely with Cadence - maybe its better now). As said though, this is on my to-do list for O2. |
Add ability to OrignSim to be able to execute a task from the compiled RTL.
e.g.
I dont mind helping to work on it- just wondering if anyone has any advice or particulars they care about.
The text was updated successfully, but these errors were encountered: