Skip to content

Instantly share code, notes, and snippets.

@ZipCPU
Created April 10, 2019 16:56
Show Gist options
  • Save ZipCPU/cc707c81baa7b438f38b81608837e91e to your computer and use it in GitHub Desktop.
Save ZipCPU/cc707c81baa7b438f38b81608837e91e to your computer and use it in GitHub Desktop.
module miter (
input i_clk,
input i_reset,
input i_tap_wr,
input [11:0] i_tap,
input i_ce,
input [11:0] i_sample
);
wire [30:0] ref_result;
wire [30:0] uut_result;
fastfir ref (
.mutsel (8'd 0),
.i_clk (i_clk ),
.i_reset (i_reset ),
.i_tap_wr (i_tap_wr ),
.i_tap (i_tap ),
.i_ce (i_ce ),
.i_sample (i_sample ),
.o_result (ref_result)
);
fastfir uut (
.mutsel (8'd `mutidx),
.i_clk (i_clk ),
.i_reset (i_reset ),
.i_tap_wr (i_tap_wr ),
.i_tap (i_tap ),
.i_ce (i_ce ),
.i_sample (i_sample ),
.o_result (uut_result)
);
initial assume(!i_reset);
always @(*)
if (!i_reset)
assert (ref_result == uut_result);
endmodule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment