Whew! I have got the chip select to work finally - all I need to do is to put the address in the "always" block:
always @(A0_19) begin
if(A0_19 >= 20'hffff0 && A0_19 <= 20'hfffff)
CS_IO_1 <= 1;
else
CS_IO_1 <= 0;
end
At the least, when it resets, it goes back to the same address and the same instructions instead of going everywhere in the last experiment:
Since I can get it to be selected, what if I try to connect this to an SDRAM? Sounds like I'm wrestling with a grizzly bear. Or maybe not. Hmm, I can try to dump some stuff into the SDRAM as a start. Fortuntately, I still have the old copies of the sample codes when I purchased the ASK2CB. However, I got into a big roadblock - getting this to compile, and even getting this to be programmed into the SDRAM is a big issue too! That old codes which have the NIOS only worked in Quartus II 12 and below, and I'm using the last version 13, so I have to port that whole project into Qsys.
And that's isn't fun, I admit. I couldn't even convert the thing without getting errors during compilation and etc. I have to create that project again, and used these SDRAM values I got from the old codes:
It is extremely tedious! After a whole evening, I got this to work finally:
Of course, that doesn't end here. I'm writing a simple loader program that loads stuff from the PC to the SDRAM on that board. And here are the updated NIOS 2 project template too, if you do not feel like creating the whole project again. (The project template is in the files section: nios_sdram_ASK2CB)
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.