Hi,
I designed a simple adder using the add/import peripheral feature in EDK. I removed the sum register in the write process, and add a my_adder process to calculate the sum. Every time I run the test (a sample software application), I get a 0 as the sum. I got both reg0 and reg1 correct, but not the sum. Anyone has an idea what I've done wrong? I can't figure if it's the code issue, or I am supposed to change some setting in EDK. Thanks.
part of my application code:
MY_ADDER_mWriteReg(XPAR_MY_ADDER_0_BASEADDR, 0, 10); MY_ADDER_mWriteReg(XPAR_MY_ADDER_0_BASEADDR, 0x4, 7);
a = MY_ADDER_mReadReg(XPAR_MY_ADDER_0_BASEADDR, 0); b = MY_ADDER_mReadReg(XPAR_MY_ADDER_0_BASEADDR, 0x4); for(i=0; i slv_reg0 slv_reg1 null; end case; end if; end if;
end process SLAVE_REG_WRITE_PROC;
-- implement slave model register read mux SLAVE_REG_READ_PROC : process( slv_reg_read_select, slv_reg0, slv_reg1, slv_reg2 ) is begin
case slv_reg_read_select is when "100" => slv_ip2bus_data slv_ip2bus_data slv_ip2bus_data slv_ip2bus_data '0'); end case;
end process SLAVE_REG_READ_PROC;