Add CBOR transactors for UART, I2C, JTAG, SPI and SWD#3
Add CBOR transactors for UART, I2C, JTAG, SPI and SWD#3imateosd wants to merge 37 commits intonipo:masterfrom
Conversation
…er functions and change 'undefinite' to 'indefinite'
…f a test in a file
… colors for different log levels
…ults and save them in a log file
…s for testbenches
…nd/response buses and tests
…d/response buses and tests
…the processing of the previous one and chain back to back updates
…d/response buses and tests
…command/response buses and tests
… inputs and not generics to allow for runtime configuration
…nd/response buses and tests
… reports functions
nipo
left a comment
There was a problem hiding this comment.
Overall, this is an interesting set of changes.
The second half of the commits that are changes and fixes on files introduced in the same PR should be reordered and squashed into relevant changes.
| -- Serializes a number, depending on sign of the value parameter, it | ||
| -- spills a positive or negative item | ||
| function cbor_number(value: integer) return byte_string; | ||
| function cbor_number(value: unsigned) return byte_string; |
| -- with the minimum count of bytes. Passed value is the actual value | ||
| -- (negative). | ||
| function cbor_negative(value: integer) return byte_string; | ||
| function cbor_negative(value: unsigned) return byte_string; |
There was a problem hiding this comment.
Maybe splitting the undefinite -> indefinite changes from the rest would help review.
| function to_string(level : log_level_t) return string; | ||
|
|
||
| function ansi_escape(command : character; | ||
| arg0 : integer := - 1; |
| function "and"(l, r : byte_string) return byte_string; | ||
| function "or"(l, r : byte_string) return byte_string; | ||
| function "xor"(l, r : byte_string) return byte_string; | ||
| function "+"(l, r : byte_string) return byte_string; |
There was a problem hiding this comment.
Concatination operator for VHDL is &, and it is implicitly defined for arrays like byte_string. Do we really need + to be basically an alias?
|
|
||
| component uart_tx_no_generics is | ||
| generic( | ||
| bit_count_c : natural range 7 to 8 |
There was a problem hiding this comment.
It could be made a runtime config as well.
| end case; | ||
| end function; | ||
|
|
||
| -- Lookup table function to convert divisor to baud rate |
There was a problem hiding this comment.
Rather than having a divisor, you may as well have an accumulator where:
- on each cycle, add baud rate,
- if accumulated value is more than system clock, a bit time passed, substract system clock
This is a functionality could be added in nsl_event.tick library by taking inspiration in nsl_signal_generator.frequency.frequency_generator.
There was a problem hiding this comment.
This commit could be split, reordered and squashed with relevant library changes
| Default.wcfg | ||
| isim1.wdb | ||
| *.gtkw | ||
| **/nsl_simulation/ |
…d flags mode and filed flags mode and tests
… configuration to run tests in CI
…port.txt if it exist before running the testbench
… the names in the actual implementation
…-side sidebands, removed by mistake
f1dce4f to
24e18c2
Compare
I2C, SPI, JTAG, SWD, UART transactors
This merge request adds new transactor implementations for I2C, SPI, JTAG, SWD and UART. It introduces new command and response formats for the transactors based in CBOR-encoded payloads. The descriptions of the encoded command and responses are in the
cbor_transactorpackages of each protocol library.The transactors have AXI-Stream command/response interfaces instead of BNOC interfaces.
EZ-USB-FX2 interface
It also adds an AXI-Stream interface for Cypress' EZ-USB-FX2 controller in Slave FIFO mode with synchronous R/W. Three variants:
Simulation/testing helpers
The following packages have been introduced or expanded:
*_check_*functions. They are meant to be used together with the changes innsl_simulation/loggingandnsl_simulation/tests_reports.Supporting library changes
Minor bug fix
data_ichanges being lost when they occur during the processing of the previous value.Automatic testing infrastructure using pytest
make run, parses structured report.txt results and exposes each VHDL test case as a pytest item with JUnit XML output.