Skip to content

Commit

Permalink
added rdl example replicating ext rf and addrmaps
Browse files Browse the repository at this point in the history
  • Loading branch information
sdnellen committed Oct 11, 2024
1 parent bb9d007 commit 920331d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions rdl_examples/issue_94_replicated_externals.rdl
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 920331d

Please sign in to comment.