forked from Juniper/open-register-design-tool
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added rdl example replicating ext rf and addrmaps
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |