Skip to content
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

Update and refactor pipeline examples, add moving average filter examples #195

Merged
merged 3 commits into from
Nov 20, 2024

Conversation

Konf
Copy link
Contributor

@Konf Konf commented Nov 20, 2024

This PR introduces:

  • Some changes to existing examples 4.1.2, 4.1.3 and 4.1.4: Better FF grouping and unified stage numbering. I got some feedback that examples were complicated and not easy to understand and this is an attempt to fix it.
  • New basic FIR-filter examples: 4 stage depth moving average filter and the same filter in systolic form. Testbench with sine wave table has some "glitches" to show actual filter behavior.
  • Systolic array example 4.1.5 was moved/renamed as 4.1.7 with no changes made.

@@ -62,6 +62,7 @@ module tb;
`ifdef __ICARUS__
$dumpvars;
`endif
key[3:1] = '0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше key [w_key - 1:1] <= '0;

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Также ниже лучше делать @ (posedge clk), а не # 10. Стиль testbench c #10 может приводить к race conditions

logic [(2*w_sw_actual)-1:0] pow_data_stage_1;
logic [(3*w_sw_actual)-1:0] pow_data_stage_2;
logic [(4*w_sw_actual)-1:0] pow_data_stage_3;
logic [(2*w_sw_actual)-1:0] pow_data_stage_1_ff;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В компаниях чаще пишут не _N_ff, а _rN или _qN. Но ладно, _N_ff тоже нормально

@yuri-panchul yuri-panchul merged commit 5c15b42 into yuri-panchul:main Nov 20, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants