From b2659591cbf030b6e6fc5ff68e8f4bcceaafc58c Mon Sep 17 00:00:00 2001 From: adam Date: Sat, 25 Aug 2007 09:47:46 +0100 Subject: [PATCH] added working test case for send-without-destination --- Makefile | 3 +- ships/BitFifo.ship | 1 - ships/Memory.ship | 7 ++-- src/edu/berkeley/fleet/fpga/Fpga.java | 6 ++-- src/edu/berkeley/fleet/fpga/Generator.java | 10 ++++-- .../berkeley/fleet/ies44/InstructionEncoder.java | 4 +-- tests/pump/send-without-destination.fleet | 37 ++++++++++++++++++++ 7 files changed, 56 insertions(+), 12 deletions(-) create mode 100644 tests/pump/send-without-destination.fleet diff --git a/Makefile b/Makefile index 2974747..220845b 100644 --- a/Makefile +++ b/Makefile @@ -118,7 +118,8 @@ svgs = $(shell find doc -name \*.svg) manual: fleet.jar $(svgs:%.svg=%.pdf) $(java) -jar fleet.jar doc - cd .tmp; TEXINPUTS=$$TEXINPUTS:../doc/ pdflatex *.tex + cd .tmp; ln -sf ../doc/*.bib . + cd .tmp; TEXINPUTS=$$TEXINPUTS:../src/edu/berkeley/fleet/assembler/:../doc/ pdflatex *.tex open .tmp/*.pdf ## API docs #################################################################################### diff --git a/ships/BitFifo.ship b/ships/BitFifo.ship index e359290..287692a 100644 --- a/ships/BitFifo.ship +++ b/ships/BitFifo.ship @@ -354,7 +354,6 @@ public void service() { initial enqueue_remaining = 0; initial bitstorage_count = 0; - // FIXME: signextend, LSBfirst always @(posedge clk) begin if (!in_r && in_a) in_a <= 0; if (!inOp_r && inOp_a) inOp_a <= 0; diff --git a/ships/Memory.ship b/ships/Memory.ship index ae99d10..39110c8 100644 --- a/ships/Memory.ship +++ b/ships/Memory.ship @@ -157,8 +157,8 @@ module memory (clk, `input(preload_r, preload_a, preload_a_, [(`DATAWIDTH-1):0], preload_d) `input(cbd_r, cbd_a, cbd_a_, [(`DATAWIDTH-1):0], cbd_d) - `output(ihorn_r, ihorn_r_, ihorn_a, [(`INSTRUCTION_WIDTH-1):0], ihorn_d_) - `defreg(ihorn_d_, [(`INSTRUCTION_WIDTH-1):0], ihorn_d) + `output(ihorn_r, ihorn_r_, ihorn_a, [(`PACKET_WIDTH-1):0], ihorn_d_) + `defreg(ihorn_d_, [(`PACKET_WIDTH-1):0], ihorn_d) `output(dhorn_r, dhorn_r_, dhorn_a, [(`PACKET_WIDTH-1):0], dhorn_d_) `defreg(dhorn_d_, [(`PACKET_WIDTH-1):0], dhorn_d) @@ -253,7 +253,8 @@ module memory (clk, case (command[(`INSTRUCTION_WIDTH-1):(`INSTRUCTION_WIDTH-2)]) 0: begin ihorn_full <= 1; - ihorn_d <= command; + `packet_data(ihorn_d) <= `instruction_data(command); + `packet_dest(ihorn_d) <= `instruction_dest(command); end 1: begin dhorn_full <= 1; diff --git a/src/edu/berkeley/fleet/fpga/Fpga.java b/src/edu/berkeley/fleet/fpga/Fpga.java index 919ca3f..5d2fb55 100644 --- a/src/edu/berkeley/fleet/fpga/Fpga.java +++ b/src/edu/berkeley/fleet/fpga/Fpga.java @@ -183,7 +183,7 @@ public class Fpga extends Fleet { System.out.print(" krunk"+(krunk++)+"(clk, "); System.out.print("instruction_"+getUniqueName(port.getShip())+"_"+port.getName()+"_r, "); System.out.print("instruction_"+getUniqueName(port.getShip())+"_"+port.getName()+"_a, "); - System.out.print("instruction_"+getUniqueName(port.getShip())+"_"+port.getName()+", "); + System.out.print("`packet_data(instruction_"+getUniqueName(port.getShip())+"_"+port.getName()+"), "); System.out.print("dest_"+getUniqueName(port.getShip())+"_"+port.getName()+"_r, "); System.out.print("dest_"+getUniqueName(port.getShip())+"_"+port.getName()+"_a, "); System.out.print("dest_"+getUniqueName(port.getShip())+"_"+port.getName()+", "); @@ -303,7 +303,7 @@ public class Fpga extends Fleet { for(int i=0; i