Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Update for Veryl v0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dalance committed Mar 14, 2024
1 parent fc6243a commit 25a5d18
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions src/counter/counter.veryl
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/// Value counter
pub module counter #(
/// Counter width
parameter WIDTH: u32 = 2,
param WIDTH: u32 = 2,
/// Max value of counter
parameter MAX_COUNT: bit<WIDTH> = '1,
param MAX_COUNT: bit<WIDTH> = '1,
/// Min value of counter
parameter MIN_COUNT: bit<WIDTH> = '0,
param MIN_COUNT: bit<WIDTH> = '0,
/// Initial value of counter
parameter INITIAL_COUNT: bit<WIDTH> = MIN_COUNT,
param INITIAL_COUNT: bit<WIDTH> = MIN_COUNT,
/// Whether counter is wrap around
parameter WRAP_AROUND: bit = 1,
param WRAP_AROUND: bit = 1,
/// Counter type
localparam COUNT: type = logic<WIDTH>,
local COUNT: type = logic<WIDTH>,
) (
/// Clock
i_clk: input logic,
Expand Down
6 changes: 3 additions & 3 deletions src/delay/delay.veryl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/// Delay input by configured cycle
pub module delay #(
/// Clock cycle of delay
parameter DELAY: u32 = 1,
param DELAY: u32 = 1,
/// Input/output data width
parameter WIDTH: u32 = 1,
param WIDTH: u32 = 1,
/// Input/output data type
parameter TYPE: type = logic<WIDTH>,
param TYPE: type = logic<WIDTH>,
) (
/// Clock
i_clk: input logic,
Expand Down
8 changes: 4 additions & 4 deletions src/lfsr/lfsr_galois.veryl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
pub module lfsr_galois #(
/// Size of the LFSR in bits
parameter SIZE : u32 = 64 ,
localparam tapvec: type = logic<SIZE>,
param SIZE : u32 = 64 ,
local tapvec: type = logic<SIZE>,
/// Bit-vector representing the taps of the LFSR.
/// Default values provided for `SIZE` in range [2, 64]
parameter TAPVEC: tapvec = case SIZE {
param TAPVEC: tapvec = case SIZE {
2 : 2'h3,
3 : 3'h5,
4 : 4'h9,
Expand Down Expand Up @@ -88,7 +88,7 @@ pub module lfsr_galois #(

assign val_next[SIZE - 1] = o_val[0];
for i in 0..(SIZE - 1) :g_taps {
localparam k: u32 = SIZE - 2 - i;
local k: u32 = SIZE - 2 - i;
if TAPVEC[k] :g_tap {
assign val_next[k] = if i_set {
i_setval[k]
Expand Down

0 comments on commit 25a5d18

Please sign in to comment.