Add Addressmap block size to generated package (#134)

* add map size as a localparam in rdl map package

* rename from _SIZE -> _BYTES_SIZE

* fix names on new test & localparam

* wrap map size in SVInt
This commit is contained in:
Aylon Chaim Porat
2025-03-04 00:16:25 -05:00
committed by GitHub
parent aba2af17af
commit 28ed82129f
6 changed files with 25 additions and 0 deletions

View File

View File

@@ -0,0 +1,5 @@
addrmap top {
reg {
field {} f1[32] = 0;
} my_reg;
};

View File

@@ -0,0 +1,12 @@
{% extends "lib/tb_base.sv" %}
{% block seq %}
{% sv_line_anchor %}
##1;
cb.rst <= '0;
##1;
// check block size
assert(regblock_pkg::REGBLOCK_SIZE == {{exporter.ds.top_node.size}});
{% endblock %}

View File

@@ -0,0 +1,5 @@
from ..lib.sim_testcase import SimTestCase
class Test(SimTestCase):
def test_dut(self):
self.run_test()