A
alivingstone
Guest
I think this may be a common problem for the pros out there...
I have a project where I use top-level generics to size aspects of the design. I allow the synthesis tool to use the default bindings, but I like to assign different values during my behavioral testbench to speed things up.
Pre-synthesis simulation works great, but post-synthesis or post-route simulations crash because the testbench is trying to map generics to a synthesized component with no generics. This must come up often -- is there a standard strategy for this? Configuration
Code snippet from the testbench:
entity testbench is
generic (
HPIXELS : positive := 251;
VPIXELS : positive := 2
);
end entity;
architecture bhvr of testbench is
component camera_top
generic (
HPIXELS : positive := 320;
VPIXELS : positive := 240;
PIXDEPTH : integer range 1 to 16 := 16
);
port ( ... );
end component;
begin
uut : camera_top
generic map (
HPIXELS => HPIXELS,
VPIXELS => VPIXELS
)
port map ( ... );
end architecture;
Errors from simulator (ModelSim PE 10.0a):
# ** Warning: (vsim-8713) testbench.vhd(277): Bad default binding for component at 'uut'.
# (Generic 'PIXDEPTH' is not on the entity.)
# (Entity has no generics.)
# Region: /testbench/uut
# ** Warning: (vsim-8713) testbench.vhd(277): Bad default binding for component at 'uut'.
# (Generic 'VPIXELS' is not on the entity.)
# (Entity has no generics.)
# Region: /testbench/uut
# ** Warning: (vsim-8713) testbench.vhd(277): Bad default binding for component at 'uut'.
# (Generic 'HPIXELS' is not on the entity.)
# (Entity has no generics.)
# Region: /testbench/uut
Thanks all.
I have a project where I use top-level generics to size aspects of the design. I allow the synthesis tool to use the default bindings, but I like to assign different values during my behavioral testbench to speed things up.
Pre-synthesis simulation works great, but post-synthesis or post-route simulations crash because the testbench is trying to map generics to a synthesized component with no generics. This must come up often -- is there a standard strategy for this? Configuration
Code snippet from the testbench:
entity testbench is
generic (
HPIXELS : positive := 251;
VPIXELS : positive := 2
);
end entity;
architecture bhvr of testbench is
component camera_top
generic (
HPIXELS : positive := 320;
VPIXELS : positive := 240;
PIXDEPTH : integer range 1 to 16 := 16
);
port ( ... );
end component;
begin
uut : camera_top
generic map (
HPIXELS => HPIXELS,
VPIXELS => VPIXELS
)
port map ( ... );
end architecture;
Errors from simulator (ModelSim PE 10.0a):
# ** Warning: (vsim-8713) testbench.vhd(277): Bad default binding for component at 'uut'.
# (Generic 'PIXDEPTH' is not on the entity.)
# (Entity has no generics.)
# Region: /testbench/uut
# ** Warning: (vsim-8713) testbench.vhd(277): Bad default binding for component at 'uut'.
# (Generic 'VPIXELS' is not on the entity.)
# (Entity has no generics.)
# Region: /testbench/uut
# ** Warning: (vsim-8713) testbench.vhd(277): Bad default binding for component at 'uut'.
# (Generic 'HPIXELS' is not on the entity.)
# (Entity has no generics.)
# Region: /testbench/uut
Thanks all.