-
Notifications
You must be signed in to change notification settings - Fork 2
Add ECM support, improve stream handling, and add the committed_padder component. The RGMII driver now handles the AXI4-Stream interface, with various stream tools added and updated. #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
nipo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall assessment: The committed_padder component is well-designed and thoroughly tested (excellent work on the test coverage!). However, there are several critical issues that must be addressed before this can be merged.
Must Fix:
- Type mismatch in committed_padder (committed_req vs committed_req_t)
- FIFO generate condition logic needs verification
- Process sensitivity list issue in packet_counter_proc
- Test case 6 behavior discrepancy (cancelled frames + padding)
Needs Justification:
- Severity downgrade in width_adapter (could hide bugs)
- Impure function marking without clear side effects
Documentation:
- Document ready_toggle feature purpose
- Fix typo in comment
- Consider renaming wwv function for clarity
Please address these issues and I'll be happy to re-review.
| reset_n_i : in std_ulogic; | ||
| clock_i : in std_ulogic; | ||
|
|
||
| in_i : in committed_req; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type mismatch: should be committed_req_t not committed_req (and similarly for committed_ack_t). The package definition uses committed_req_t as the type name.
| out_available_o => out_available_o, | ||
| in_free_o => in_free_o | ||
| ); | ||
| generate_fifo_homogenous: if clock_i'length /= 1 generate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition looks problematic. Should this be checking clock_count_c /= 1 instead of clock_i'length /= 1? The generic clock_count_c indicates the intended number of clocks, but clock_i'length may not behave as expected here.
| out_available_o <= to_integer(out_available); | ||
| in_free_o <= to_integer(in_free); | ||
|
|
||
| packet_counter_proc: process(reset_n_i, clock_i) is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sensitivity list includes reset_n_i but the reset is checked inside the rising_edge block (line 106-108). This should be a synchronous-reset-only process with just process(clock_i) or the reset should be moved to an async section.
| assert in_config_c.has_keep = out_config_c.has_keep | ||
| report "In/out keep do not match" | ||
| severity failure; | ||
| severity warning; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why downgrade this from failure to warning? Mismatched keep signals between input and output could lead to data corruption. This seems like it should remain a fatal error. Please provide justification for this change or revert it.
|
|
||
| -- Factory function for a frame | ||
| function frame( | ||
| impure function frame( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this function now marked impure? There's no obvious state modification or side effects in the implementation. Impure functions can behave differently in synthesis vs simulation. Please document the reason for this change.
| variable user : out std_ulogic_vector; | ||
| variable dest : out std_ulogic_vector); | ||
| variable dest : out std_ulogic_vector; | ||
| constant ready_toggle : boolean := false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the use case for ready_toggle? The PRBS-based ready toggling seems simulation-specific but isn't documented. Please add a comment explaining when and why this feature should be used.
| return to_le(resize(n, 32)); | ||
| end function; | ||
|
|
||
| function wwv(n: integer range 0 to 65535 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function takes a 16-bit integer but returns 32 bits (via resize to 32). Is this intentional? For ECM, the statistics field is indeed 32-bit, but the function name and parameter suggest 16-bit. Consider renaming to dwv (dword value) or adjusting the parameter range to match the 32-bit output.
lib/nsl_inet/func/func.pkg.vhd
Outdated
| generic( | ||
| clock_hz_c : natural; | ||
|
|
||
| -- Whether l1 has FCS appended ot frames |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "appended ot frames" should be "appended to frames"
| out_s.req, out_s.ack, clock_s, | ||
| from_hex("ffffffffffffffff"), true, LOG_LEVEL_FATAL, | ||
| 1, 2); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment says "3 data + 5 padding bytes with cancel" but according to the implementation (committed_padder.vhd lines 117-118), cancelled frames skip padding and exit early. So this should actually be "3 data bytes + cancel (no padding)". Please verify the expected behavior and update either the test or the implementation.
b2bdf05 to
cad2ce2
Compare
b0c132d to
3693ac2
Compare
Add a module that pads committed frames to a minimum size by appending a constant padding byte. Frames already meeting or exceeding the minimum size are passed through unchanged. Configuration: - min_size_c: Minimum frame size (positive generic) - padding_byte_c: Padding byte value (default x"00") Implementation uses a 2-deep FIFO to break combinatorial paths between input and output. The output stage maintains a down-counter initialized to min_size_c, decremented for each data byte output. When the input frame ends, padding is added if counter hasn't reached zero before outputting the commit/cancel status. Includes comprehensive testbench covering: - Short frames (require padding) - Exact size frames (no padding) - Long frames (no padding) - Empty frames (full padding) - Both commit and cancel status handling tests/bnoc/committed_padder: fix on comments.
…for P&R when header length is 0.
…cs is forwarded. nsl_inet/ethernet: ethernet host generics to specify whether or not fcs is forwarded. lib/nsl_inet/func: typo.
…cancellable FIFO depending on the number of input clocks. When a single clock is provided, the FIFO tracks the number of available stored packets.
…h AXI4-Stream instead of the BNOC-specific committed type.
… in pin can alse be used to force CRC invalid.
…in_size_c' bytes.
…ackets between two independant clock domains. No back-pressure on the input interface: if the fifo in overrun the entire packet is dropped. t
…ived. If the packet is smaller, it is just outputted.
…aster_vector in order to use it as local fifo.
…e item at a specified index.
Cleaning. tests/amba: less packets played.
… drop management. Renaming of axi4_stream_async_packet_drop_fifo into axi4_stream_atomic_cancellable
3693ac2 to
fa3f74e
Compare
No description provided.