bsv
¶
Callback.
Classes:
-
BSVCallback–Callback function for Peakrdl Generated Bluespec verilog code.
BSVCallback
¶
BSVCallback(dut)
Bases: CallbackBase
Callback function for Peakrdl Generated Bluespec verilog code.
The BSV generated RTL
1. Retains the signal name for Reg* types.
2. For Wire types the signal has a _wget suffix to indicate value and a _whas suffix to indicate the signal is driven in the current cycle.
3. The original Bluespec code uses s
The override for the sig function takes care of this difference.
Parameters:
-
dut(Any) –cocotb dut reference.
Methods:
-
read–Finds the actual signal in RTL and returns its value.
-
sig–Finds the signal in dut and returns a reference to it.
-
write–Finds the actual signal in RTL and sets its value.
Source code in src/peakrdl_cocotb_ralgen/callbacks/callback_base.py
9 10 11 12 13 14 15 | |
read
¶
read(sigHash)
Finds the actual signal in RTL and returns its value.
Parameters:
-
sigHash(dict) –A dictionary of signal parameters " {"reg": register, "sig": signal_name, "low": signal's low index in the register, "high": signal's high index in the register, }
Source code in src/peakrdl_cocotb_ralgen/callbacks/callback_base.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |
sig
¶
sig(sigHash)
Finds the signal in dut and returns a reference to it.
Parameters:
-
sigHash(dict) –A dictionary of signal parameters " {"reg": register, "sig": signal_name, "low": signal's low index in the register, "high": signal's high index in the register, }
Source code in src/peakrdl_cocotb_ralgen/callbacks/bsv.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
write
¶
write(sigHash, wr)
Finds the actual signal in RTL and sets its value.
Parameters:
-
sigHash(dict) –A dictionary of signal parameters " {"reg": register, "sig": signal_name, "low": signal's low index in the register, "high": signal's high index in the register, }
-
wr(int) –Integer value to write to the signal
Source code in src/peakrdl_cocotb_ralgen/callbacks/callback_base.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |