Forum Discussion
Altera_Forum
Honored Contributor
14 years ago --- Quote Start --- for reading....
if avs_m0_read='1' then
avm_m1_read<=avs_m0_read;
avm_m1_address<=avs_m0_address;
--avm_m0_waitrequest<='1';
avs_m0_waitrequest<='1';
end if; for writing..... PI_WRAP_EN,PI_WRAP_DE are cdma encoding and decoding port maps. here i didnot add byte enable . if avs_m0_write='1' then
avm_m1_write<=avs_m0_write;
avm_m1_address<=avs_m0_address;
avs_m0_waitrequest<=avm_m1_waitrequest;
avs_m0_waitrequest<='1';
PI_WRAP_DE<=avs_m0_writedata;
avm_m1_writedata<=OUTPUT_WRAP_DE;
end if; is that read and write operations are correct. Tell me sir, Read and write should be '0' or '1' to start operation. thank you very much in advance. --- Quote End --- You need to start simulating your design by using a simulator. Some quick comments: - The "if avs_m0_read='1' then" (and the same for the write) are not needed. Just look at the code you wrote after the if/then "avm_m1_read<=avs_m0_read" but in order to execute the statement avs_m0_read must already be one which means that "avm_m1_read" will end up being '1' forever once 'avs_m0_read' first gets set to 1. - Ask yourself what do you think happens when you hit the statement "avs_m0_waitrequest<='1';". No where will it ever get set back to '0', which means the interface will forever be saying to wait which means it will hang. The entire 'if/then' statement needs to be removed. Like I said, it's time that you start to run the simulator with your code. Verify that your implementation of the various Avalon signals matches what the specification says. Kevin Jennings