From 920331d09c3279e03401eca6a3cbf77e90403ba2 Mon Sep 17 00:00:00 2001 From: Scott Nellenbach Date: Thu, 10 Oct 2024 20:16:19 -0400 Subject: [PATCH] added rdl example replicating ext rf and addrmaps --- .../issue_94_replicated_externals.rdl | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 rdl_examples/issue_94_replicated_externals.rdl diff --git a/rdl_examples/issue_94_replicated_externals.rdl b/rdl_examples/issue_94_replicated_externals.rdl new file mode 100644 index 0000000..6b519ee --- /dev/null +++ b/rdl_examples/issue_94_replicated_externals.rdl @@ -0,0 +1,26 @@ + +reg some_4B_reg { + field { sw=rw; hw=r; } lsb_field[16] = 16'hffff; + field { sw=rw; hw=r; } msb_field[16] = 16'h0; +}; + +regfile my_regfile { + some_4B_reg regs1[8]; // 8 4B regs +}; + +addrmap my_addrmap { + some_4B_reg regs1[8]; // 8 4B regs +}; + +addrmap { + my_addrmap norep_map; // creates single interface from base decoder w 3b address + //my_addrmap rep_map[4]; // fails with replicated address map error + external my_regfile norep_rf; // creates single interface from base decoder w 3b address (same as addrmap) + external my_regfile rep_rf[4] @0x100; // creates single interface from base decoder w 5b address + regfile { + external my_regfile norep_rf; // creates 4 interfaces from base decoder each w 3b address + } rep_wrapper_rf[4] @0x200; + regfile { + my_addrmap norep_map; // creates 4 interfaces from base decoder each w 3b address + } rep_wrapper_rf[4] @0x300; +} top; \ No newline at end of file