URL
https://opencores.org/ocsvn/i8255/i8255/trunk
[/] [i8255/] [i8255.v] - Diff between revs 2 and 3
Show entire file |
Details |
Blame |
View Log
Rev 2 |
Rev 3 |
Line 339... |
Line 339... |
if(ncs==0) begin
|
if(ncs==0) begin
|
case(addr)
|
case(addr)
|
//control register
|
//control register
|
2'b11: begin //write - control
|
2'b11: begin //write - control
|
if (data[7:7]==0) begin
|
if (data[7:7]==0) begin
|
gracw=1;
|
gracw<=1;
|
end
|
end
|
else begin
|
else begin
|
//send mode to the all groups
|
//send mode to the all groups
|
iflag<=0;
|
iflag<=0;
|
extrai<=0;
|
extrai<=0;
|
Line 396... |
Line 396... |
always @(negedge nrd) begin
|
always @(negedge nrd) begin
|
//read event
|
//read event
|
if(ncs==0) begin
|
if(ncs==0) begin
|
case (addr)
|
case (addr)
|
2'b11: begin//read - control
|
2'b11: begin//read - control
|
intdata=mode;
|
intdata<=mode;
|
iflag=0;
|
iflag<=0;
|
oflag=0;
|
oflag<=0;
|
extrai=1;
|
extrai<=1;
|
end
|
end
|
2'b00: begin //read - porta
|
2'b00: begin //read - porta
|
iflag=1;
|
iflag<=1;
|
gracw=3;
|
gracw<=3;
|
sel=1;
|
sel<=1;
|
end
|
end
|
2'b01: begin//read - portb
|
2'b01: begin//read - portb
|
iflag=1;
|
iflag<=1;
|
grbcw=3;
|
grbcw<=3;
|
sel=1;
|
sel<=1;
|
end
|
end
|
2'b10: begin//read - portc
|
2'b10: begin//read - portc
|
iflag=1;
|
iflag<=1;
|
gracw=5;
|
gracw<=5;
|
grbcw=5;
|
grbcw<=5;
|
sel=3;
|
sel<=3;
|
end
|
end
|
endcase
|
endcase
|
end
|
end
|
end
|
end
|
always @(posedge nrd) begin
|
always @(posedge nrd) begin
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.