1
0
mirror of https://github.com/aolofsson/oh.git synced 2025-01-30 02:32:53 +08:00

Changing shift/load order

- Load should always have higher priority, but load is blocked if there is a pending shift anyway...
This commit is contained in:
Andreas Olofsson 2016-03-21 20:50:41 -04:00
parent a991a4fc06
commit 3ae9c26d38

View File

@ -56,13 +56,13 @@ module oh_par2ser (/*AUTOARG*/
//transfer counter
always @ (posedge clk or negedge nreset)
if(~nreset)
if(!nreset)
count[CW-1:0] <= 'b0;
else if(shift & busy)
count[CW-1:0] <= count[CW-1:0] - 1'b1;
else if(start_transfer)
count[CW-1:0] <= datasize[CW-1:0]; //one "SW sized" transfers
else if(shift & busy)
count[CW-1:0] <= count[CW-1:0] - 1'b1;
//output data is valid while count > 0
assign busy = |count[CW-1:0];
@ -72,7 +72,6 @@ module oh_par2ser (/*AUTOARG*/
//wait until valid data is finished
assign wait_out = wait_in |
busy;
//##########################
//# SHIFT REGISTER