Commit Graph

149 Commits

Author SHA1 Message Date
9046dcf3e3
Description in regfile.yaml now says 'regfile' and not 'register' 2021-10-18 23:06:21 -07:00
e05408e8a1
Add support for inline-comments
It is possible to enable them for:

- fields
- registers
- regfiles
- addrmaps
2021-10-17 00:53:22 -07:00
16d1774cd2
Remove log.py TODO that got already implemented 2021-10-14 23:29:19 -07:00
b23ddded74
Package with enums shall not be dumped if no enums are present 2021-10-14 23:22:01 -07:00
6e355c62af
Add support for rsvdset and rsvdsetX 2021-10-14 23:16:30 -07:00
4ba047dd2a
Extend test_simple_rw_reg with 3 more tests
The following tests are now included:

    - Check access to registers over AHB bus
    - Check access to register over HW interface
    - Check access to register over HW interface if hw_wr-input
      is disabled.
    - Check if the slave responds with a correct error sequence if
      an illegal address is accessed.
2021-10-11 23:49:31 -07:00
ed08d4bd35
Fix external-register bug where the sw_rd-wire is missing
This was introduced in dc37c879 because sw_rd-wires got removed
here for registers that don't need it.
2021-10-06 23:39:04 -07:00
57d8050d56
Fix bug in bus-width of amba3ahblite-widget's instantiation 2021-10-06 23:28:48 -07:00
ace4238ccf
Fix bug in external read-interface
In dc37c879, some properties got saved in self.properties of a
Component. In that commit, self.properties['sw_rd'] never got set.
For that reason, external registers with a read-interface were broken.
2021-10-06 23:20:55 -07:00
aa770073c4
Ensure that file-log gets dumped in --out_dir 2021-10-03 23:31:22 -07:00
7d5ddaf47c
Add first simple test with a simple 2-dimensional array 2021-10-03 23:24:16 -07:00
c4dca87ab5
Ensure that HSIZE is flopped and that data is shifted according to HADDR/HSIZE 2021-10-03 23:22:54 -07:00
aada5c5853
Prepare Makefiles for regression flow with CocoTB tests 2021-10-03 18:07:48 -07:00
694f7c124e
Make stickybit available for non-intr fields and add support for sticky 2021-10-03 15:48:27 -07:00
f30dce67c2
Give all genvars an gv_ prefix to prevent collisions 2021-10-02 00:38:31 -07:00
dc37c87944
Ensure that sw_rd/sw_wr wires are only generated if they are required 2021-10-02 00:32:04 -07:00
8756945a6d
Repair multi-enumerations in one regfile bug
When a regfile did use enumerations from multiple scopes this messed up
the eventual packages because every regfile only assumed 1 scope. This
is fixed now.

TODO: Check what happens if enums are defined in the register scope.
2021-09-30 00:11:50 -07:00
d3bfdeb3f0
Buswidth is now variable, based on widest register
Fixes #2.
2021-09-26 21:16:49 -07:00
6359883c27
Finish initial version of interrupt suport, closes #1
The software is now able to create most interrupt combinations of
Section 9.9 of the SystemRDL 2.0 LRM. It supports
stickybit/non-stickybit interrupts, it support posedge, negedge,
bothedge, and level interrupts, and it is able to generate all
surrounding logic.

This commit also fixes a reset-bug that caused registers that were reset
to 0 to be not reset (because 'if not reset_value' will return True if
the 'reset_value' is 0).
2021-09-26 19:40:04 -07:00
c52e59abd0
Add basic interrupt framework
Up to this point, interrupt outputs are generated and intr, enable,
mask, haltenable, and haltmask are supported. stick, stikcybit and the
different types of interrupts are not yet supported.

This commit also removes the option to turn off santiy checking. This is
a bad idea anyway...
2021-09-25 20:49:39 -07:00
8ea1ad97da
Fix AMBA AHB 3 Lite widget so that first register transactions succeed 2021-09-25 13:01:23 -07:00
28edf17a1c
Pull assignment of multiplexer wires into generate for-loop 2021-09-19 23:24:59 -07:00
887164dd52
Flip r_vld and w_vld in <REG>_sw_wr/<REG>_sw_rd assignment 2021-09-15 23:47:36 -07:00
fea0019aa8
Replace old 'reg_clk' name by more generic 'clk'
The reason is that the template will always assume that the
bus signals and the registers are synchronous. Designers should
implement possible synchronization logic outside of this block.
2021-09-15 23:42:52 -07:00
61cd1fbfe3
Add directory that will contain SystemRDL files for tests 2021-09-13 22:09:04 -07:00
85aa2f903c
Flops must not update when HREADYOUT == 0, not when r2b.rdy == 0 2021-09-13 21:52:35 -07:00
a27b57009b
Fix two issues to get AMBA widget compile clean under Verilator
The former issue was a Lint warning. HADDR % HSIZE is a modulo operation
of a 32-bit and 3-bit variable. It is cleaner to only use the LSB of
HADDR.

Furthermore, Verilator does not support unpacked arrays in packages.
2021-09-12 19:44:42 -07:00
240fba8e12
Resolve bug for addrmaps without any genvars
In this case, there would be a line with `genvars ;`. This is not
compilable by SystemVerilog compilers.
2021-09-12 19:44:42 -07:00
17f1877390
Add very basic, incomplete statemachine for AHB protocol 2021-09-12 17:13:44 -07:00
6142a13653
Add genvar-key to write-signals of external registers 2021-09-12 17:09:33 -07:00
b89bf3663f
Fix issue with read-mux assignment for multidimensional registers 2021-09-12 16:44:37 -07:00
5475bbf62d
Fix issue that causes 'input None' if no reset is present for a field 2021-09-06 22:42:32 -07:00
24d5534037
Add support for external registers
Every single field and every single alias (!) has its own
interface to the surrounding hardware. This is required
to give users the maximum amount of freedom when defining
certain properties in RDL.
2021-09-06 18:48:37 -07:00
a3b6e1caf8
Add file-exist check for input file 2021-09-06 11:58:01 -07:00
4f2ac8868a
Rename regs.yaml to register.yaml for consistency reasons 2021-09-06 00:29:29 -07:00
c689190080
Add proper support for rdy & error indication in read multiplexer
The error indication is generated if:
    - A non-existent register gets read
    - An existent register gets read but not a single bit can be
      succesfully read or written. As soon as 1 bit succeeds don't
      return an error.
2021-09-06 00:26:08 -07:00
2f38d30d76
Fix assignment to _rd_mux_in for arrays 2021-08-22 21:50:58 -07:00
08b7de9544
Fix read-multiplexer bug in case a reg is _not_ an array 2021-08-22 21:43:53 -07:00
d298e79ec1
Fix bug where an empty search path caused srdl2sv to crash 2021-08-22 21:27:44 -07:00
8881821252
Give more consistent names to modules and packages 2021-08-22 20:46:35 -07:00
5e4a954a0c
Add _very incomplete_ AMBA 3 AHB Lite widget
This is just a start on the first widget. It is still very limited and
not yet functional in any way.
2021-08-22 20:38:56 -07:00
145ac70123
Add email address to MIT license 2021-08-15 14:12:21 -07:00
78742daba7
Add support for 'next' property to fields 2021-08-15 14:10:22 -07:00
a74377bae7
Add underflow property and checker if referenced properties exist 2021-08-15 12:56:41 -07:00
1d5bc8b75e
Fix assignment of overflow to increment input of counter 2021-08-15 12:28:07 -07:00
fd75e4c84c
Update systemrdl-compiler to v1.19.0
The main difference in this release
(https://github.com/SystemRDL/systemrdl-compiler/releases/tag/v1.19.0)
is that FieldNode.get_property('resetsignal') will now default to
finding the nearest in-scope field reset signal if not explicitly set.
The same is true for the cpuif-signal.

Before this commit, the addmap-class searched for resetsignal and cpuif
signals and saved it for the fields to be picked up later. This code is
now not required anymore
2021-08-15 11:46:40 -07:00
1d50b2b457
Add incrthreshold/decrthreshold support
It is still not possible to assign overflow/threshold signals to any
input of a different register!
2021-06-29 00:14:51 +02:00
18204d9a3e
Improve counter property
The counter now covers more corner cases regarding saturation.
Furthermore, a bug that caused incr & decr-counters to always
inadvertently increment and decrement, even if only one of the two
signals was set.

Furthermore, the overflow signal is now generated in RTL.

Still missing:
    - incrthreshold/decrthreshold is not yet supported
    - It is not yet supported to assign an underflow/overflow to the
      input of another counter.
2021-06-28 23:58:45 +02:00
4144329f3f
Add comment to delineate between counters and multiplexer assignment 2021-06-28 23:57:32 +02:00
a0dd59d19a
Add hwenable and hwmask property 2021-06-28 12:48:17 +02:00