diff options
author | Yann Herklotz <git@yannherklotz.com> | 2020-10-09 10:10:10 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2020-10-09 10:10:10 +0100 |
commit | 81e3160888df02e23fd6ff294cdab3a50f0bf3c1 (patch) | |
tree | d1566ebe3b72dbbf400ba2b87b1ea2279185e493 /data/accumulator2.v | |
parent | 8cde91d3d3d7cd63c0944f75af749d59b1f35d1a (diff) | |
download | oopsla21_fvhls-81e3160888df02e23fd6ff294cdab3a50f0bf3c1.tar.gz oopsla21_fvhls-81e3160888df02e23fd6ff294cdab3a50f0bf3c1.zip |
Make figures fit onto the page
Diffstat (limited to 'data/accumulator2.v')
-rw-r--r-- | data/accumulator2.v | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/data/accumulator2.v b/data/accumulator2.v new file mode 100644 index 0000000..c7bcc59 --- /dev/null +++ b/data/accumulator2.v @@ -0,0 +1,26 @@ +always @(posedge clk) + if ({reset == 1'd1}) + state <= 32'd16; + else + case (state) + 32'd16: state <= 32'd15; + 32'd15: state <= 32'd14; + 32'd14: state <= 32'd13; + 32'd13: state <= 32'd12; + 32'd12: state <= 32'd11; + 32'd11: state <= 32'd10; + 32'd10: state <= 32'd9; + 32'd9: state <= 32'd8; + 32'd8: state <= 32'd7; + 32'd7: state <= 32'd6; + 32'd6: state <= 32'd5; + 32'd5: state <= 32'd4; + 32'd4: state <= 32'd3; + 32'd3: state <= + ({$signed(reg_1) < $signed(32'd3)} + ? 32'd7 : 32'd2); + 32'd2: state <= 32'd1; + 32'd1: ; + default:; + endcase +endmodule |