projects
/
fleet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lots of changes to Marina test code, mostly for scan chain counters
[fleet.git]
/
ships
/
Rotator.ship
diff --git
a/ships/Rotator.ship
b/ships/Rotator.ship
index
5c8226a
..
74cb3f1
100644
(file)
--- a/
ships/Rotator.ship
+++ b/
ships/Rotator.ship
@@
-26,7
+26,8
@@
public void service() {
long data = box_in.removeDataForShip();
long mask = ~((-1L) << getInterpreter().getWordWidth());
data = data & mask;
long data = box_in.removeDataForShip();
long mask = ~((-1L) << getInterpreter().getWordWidth());
data = data & mask;
- box_out.addDataFromShip(((data << amount) | (data >> (getInterpreter().getWordWidth()-amount))) & mask);
+ long res = ((data >> amount) | (data << (getInterpreter().getWordWidth()-amount))) & mask;
+ box_out.addDataFromShip(res, (res & (1L << (getInterpreter().getWordWidth()-1)))!=0);
}
}
}
}
@@
-46,11
+47,10
@@
public void service() {
assign shamt_eq = (shamt[5:0] == (inAmount_d[5:0]));
always @(posedge clk) begin
assign shamt_eq = (shamt[5:0] == (inAmount_d[5:0]));
always @(posedge clk) begin
- if (!rst) begin
+ if (rst) begin
`reset
full <= 0;
end else begin
`reset
full <= 0;
end else begin
- `flush
`cleanup
if (`in_full && `inAmount_full && `out_empty) begin
if (!full) begin
`cleanup
if (`in_full && `inAmount_full && `out_empty) begin
if (!full) begin
@@
-104,11
+104,12
@@
rotator.inAmount:
deliver;
rotator.out:
set olc=3;
deliver;
rotator.out:
set olc=3;
- [Rq] collect, send to debug.in;
- [Rq] set flags a=c, b=b;
- [Rq] [!a] set word=0;
- [Rq] [a] set word=1;
- [Rq] send to debug.in;
+ head;
+ collect, send to debug.in;
+ set flags a=c, b=b;
+ [!a] set word=0;
+ [a] set word=1;
+ send to debug.in;
tail;
tail;