Forum Discussion
Altera_Forum
Honored Contributor
15 years agoOk, there is a simpler code:
module simpler (
data_o,
address_i,
clk,
read_i
);
output reg data_o;
input address_i;
input clk;
input read_i;
always @ (posedge clk)
begin
data_o = 32'hF0F0F0F0;
end
endmodule This only puts a constant on readdata whatever the inputs are. And there is the Nios2 sofware side... it still reads Zeros... #include "basic_io.h"# include "Test.h"# include "LCD.h"# include "DM9000A.C"
int main(void)
{
unsigned int res, i;
for(i=0; i < 255; i++)
{
res = IORD(SIMPLER_0_BASE, 0x00);
printf("\nIteracion %d, res =%d", i, res);
msleep(500);
}
return 0;
}
sorry for being so annoying