vvp: repeat: Implement partial vector receive
The repeat functor can receive a partial vector. Make sure this is handled. Since the expectation is that will only happen if the input wire is driven by a single partial selection the default recv_vec4_pv_() can be used which replaces the missing bits by `z`. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
7c25e8506c
commit
60864ff1c7
|
|
@ -234,6 +234,13 @@ void vvp_fun_repeat::recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
|||
port.ptr()->send_vec4(val, 0);
|
||||
}
|
||||
|
||||
void vvp_fun_repeat::recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t &bit,
|
||||
unsigned base, unsigned vwid,
|
||||
vvp_context_t context)
|
||||
{
|
||||
recv_vec4_pv_(port, bit, base, vwid, context);
|
||||
}
|
||||
|
||||
void compile_repeat(char*label, long width, long repeat, struct symb_s arg)
|
||||
{
|
||||
vvp_fun_repeat*fun = new vvp_fun_repeat(width, repeat);
|
||||
|
|
|
|||
|
|
@ -1450,6 +1450,9 @@ class vvp_fun_repeat : public vvp_net_fun_t {
|
|||
|
||||
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||
vvp_context_t context);
|
||||
void recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
|
||||
unsigned int base, unsigned int vwid,
|
||||
vvp_context_t context) final;
|
||||
|
||||
private:
|
||||
unsigned wid_;
|
||||
|
|
|
|||
Loading…
Reference in New Issue