Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef logic signed [2:0] symbol_t;
- typedef struct packed {
- symbol_t A;
- symbol_t B;
- symbol_t C;
- symbol_t D;
- } symbol_vector_t;
- typedef symbol_vector_t symbol_vector_set_t[];
- localparam symbol_vector_set_t CSEXTEND_PARAMETER = '{
- '{+2, 0, 0,+2},
- '{+2,+2,+1,+1},
- '{+1,+2,+2,+1},
- '{+1,+2,+1,+2},
- '{+2, 0,+2,+1},
- '{+2, 0,+1,+2},
- '{+1, 0,+2,+2},
- '{+2,+1, 0,+2}
- };
- static const symbol_vector_set_t CSEXTEND_SET = '{
- '{+2, 0, 0,+2},
- '{+2,+2,+1,+1},
- '{+1,+2,+2,+1},
- '{+1,+2,+1,+2},
- '{+2, 0,+2,+1},
- '{+2, 0,+1,+2},
- '{+1, 0,+2,+2},
- '{+2,+1, 0,+2}
- };
- function symbol_vector_set_t get_csextend();
- return '{
- '{+2, 0, 0,+2},
- '{+2,+2,+1,+1},
- '{+1,+2,+2,+1},
- '{+1,+2,+1,+2},
- '{+2, 0,+2,+1},
- '{+2, 0,+1,+2},
- '{+1, 0,+2,+2},
- '{+2,+1, 0,+2}
- };
- endfunction
- module tb;
- initial begin
- symbol_vector_t my_symbol_vector;
- assert(std::randomize(my_symbol_vector) with {
- my_symbol_vector inside {get_csextend()};
- });
- #1000;
- $finish;
- end
- endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement