Forum Discussion
LPM_MULT not working for Cyclone 10 GX device
- 1 year ago
I could strip down the design, but I have some new information. I was able to work around the issue by changing the implementation style to "Use logic elements", in lieu of "Use the default implementation" or "Use the dedicated multiplier circuitry". I believe the default implementation is to use the dedicated multiplier circuitry. I think there really is a bug in the Altera LPM_MULT IP when using multiplier blocks.
Changed to "Use loigc elements"Signal Tap showing ckt works as expected
It might be a clocking problem. Your multiplier won't produce valid output (that's why you are getting zero) until a valid input is provided after the rising clock edge. If clock is not configured or not routing it won't work. In your code you have clock set to X which is not accurate. X is the default value for "simulations" only. Be sure your clock is wired and hits the LUT blocks. Also you may want to tap/monitor the clock signal with SignalTap for verification ! Good luck and have lots of fun debugging your code
clock : in std_logic := 'X' what is your clock speed ? 100 Mhz ?
- K_Crocker1 year ago
Occasional Contributor
Here is a screenshot of the Signal Tap instantiation. The 'toggle_h' signal is a D-type flip-flop toggled at 100 MHz. Signal 'act_frame_time_h' is 'dataa' of the LPM_MULT instantiation. Signal 'act_frame_clocks_h' is the 'result'. Signal 'datab' is 'clks_per_us_h' defined as follows:
constant clks_per_us : natural := 100;
constant clks_per_us_h : std_logic_vector (6 downto 0) := conv_std_logic_vector (clks_per_us, 7);The 'X' you refer to is part of the instantiation declaration and is superseded by the argument 'clk_r' which is the 100 MHz clock associated with the parameter 'clock'.