regblock
¶
regblock Callback.
Classes:
-
RegblockCallback–Callback function for Peakrdl Generated Bluespec verilog code.
RegblockCallback
¶
RegblockCallback(dut)
Bases: CallbackBase
Callback function for Peakrdl Generated Bluespec verilog code.
Peakrdl Regblock stores the signals in a struct called field_storage A signal Foo in register Bar can be accessed as field_storage.Bar.Foo.value;
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) -> Any
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/regblock.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |
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 | |