need help with vhdl code in custom IP

Mar 21, 2006 0 Replies

Hi, I'm trying to do multiply-and-accumulate (MAC) in a custom IP created by Create/Import IP peripherals in XPS. Xilinx provides basic read/write functions with the user_logic vhdl code. I removed the code for reg2 and reg3 in these two processes. I then added MUL_AND_ACCUM process. I'm not a vhdl programmer, so I'm having difficulty with this simple piece of logic. All I'm trying to do is



mul (reg3) = num1 (reg0) * num2 (reg1); accum (reg2) = accum (reg2) + mul (reg3);



I wrote a process:



MUL_AND_ACCUM_PROC : process( Bus2IP_Clk) is begin



if Bus2IP_Clk'event and Bus2IP_Clk = '1' then if Bus2IP_Reset = '1' then slv_reg2 '0'); slv_reg3 '0'); else if slv_reg_write_select = "0010" then slv_reg2


Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required