need help with vhdl code in custom IP

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

Reply to
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.