Skip to content

Commit

Permalink
Merge pull request #133 from JDLopes/makefile_revamp
Browse files Browse the repository at this point in the history
improve asic Makefile; update UART submodule
  • Loading branch information
jjts authored Jun 2, 2021
2 parents ca7fb53 + 649c8bf commit ee5ae80
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions hardware/asic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ ifeq ($(ASIC_SERVER),)
else
ssh $(ASIC_USER)@$(ASIC_SERVER) "if [ ! -d $(REMOTE_ROOT_DIR) ]; then mkdir -p $(REMOTE_ROOT_DIR); fi"
rsync -avz --exclude .git $(ROOT_DIR) $(ASIC_USER)@$(ASIC_SERVER):$(REMOTE_ROOT_DIR)
ssh -Y -C $(ASIC_USER)@$(ASIC_SERVER) 'cd $(REMOTE_ROOT_DIR)/hardware/asic; make mem INIT_MEM=$(INIT_MEM) USE_DDR=$(USE_DDR) RUN_EXTMEM=$(RUN_EXTMEM) ASIC=1'
ssh -Y -C $(ASIC_USER)@$(ASIC_SERVER) 'cd $(REMOTE_ROOT_DIR)/hardware/asic; make mem INIT_MEM=$(INIT_MEM) USE_DDR=$(USE_DDR) RUN_EXTMEM=$(RUN_EXTMEM)'
endif

synth:
ifeq ($(ASIC_SERVER),)
make -C $(ASIC_DIR)/$(ASIC_NODE) synth
make -C $(ASIC_DIR)/$(ASIC_NODE) synth ASIC_MEM=1
else
ssh $(ASIC_USER)@$(ASIC_SERVER) "if [ ! -d $(REMOTE_ROOT_DIR) ]; then mkdir -p $(REMOTE_ROOT_DIR); fi"
rsync -avz --exclude .git $(ROOT_DIR) $(ASIC_USER)@$(ASIC_SERVER):$(REMOTE_ROOT_DIR)
ssh -Y -C $(ASIC_USER)@$(ASIC_SERVER) 'cd $(REMOTE_ROOT_DIR)/hardware/asic; make synth INIT_MEM=$(INIT_MEM) USE_DDR=$(USE_DDR) RUN_EXTMEM=$(RUN_EXTMEM) ASIC=1'
ssh -Y -C $(ASIC_USER)@$(ASIC_SERVER) 'cd $(REMOTE_ROOT_DIR)/hardware/asic; make synth INIT_MEM=$(INIT_MEM) USE_DDR=$(USE_DDR) RUN_EXTMEM=$(RUN_EXTMEM) ASIC_MEM=1'
scp $(ASIC_USER)@$(ASIC_SERVER):$(REMOTE_ROOT_DIR)/hardware/asic/$(ASIC_NODE)/synth/*.txt $(ASIC_DIR)/$(ASIC_NODE)/synth
endif

sim-synth: sw
ifeq ($(ASIC_SERVER),)
make -C $(HW_DIR)/simulation/ncsim run
make -C $(HW_DIR)/simulation/ncsim run SYNTH=1
else
ssh $(ASIC_USER)@$(ASIC_SERVER) "if [ ! -d $(REMOTE_ROOT_DIR) ]; then mkdir -p $(REMOTE_ROOT_DIR); fi"
rsync -avz --exclude .git $(ROOT_DIR) $(ASIC_USER)@$(ASIC_SERVER):$(REMOTE_ROOT_DIR)
Expand Down
4 changes: 2 additions & 2 deletions hardware/hardware.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ifeq ($(USE_DDR),1)
include $(CACHE_DIR)/hardware/hardware.mk
endif

ifneq ($(ASIC),1)
ifneq ($(ASIC_MEM),1)
#rom
SUBMODULES+=SPROM
SPROM_DIR:=$(CACHE_DIR)/submodules/MEM/sp_rom
Expand Down Expand Up @@ -50,7 +50,7 @@ endif

#system
VSRC+=$(SRC_DIR)/boot_ctr.v $(SRC_DIR)/int_mem.v
ifneq ($(ASIC),1)
ifneq ($(ASIC_MEM),1)
VSRC+=$(SRC_DIR)/sram.v
endif
VSRC+=system.v
Expand Down
2 changes: 1 addition & 1 deletion hardware/include/cpu_tasks.v
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ task cpu_uartread;
begin
# 1 uart_addr = cpu_address;
uart_valid = 1;
@ (posedge clk) #1 read_reg = uart_rdata;
@ (posedge clk) #1 read_reg = {24'd0, uart_rdata[7:0]};
@ (posedge clk) #1 uart_valid = 0;
end
endtask
Expand Down
2 changes: 1 addition & 1 deletion submodules/UART

0 comments on commit ee5ae80

Please sign in to comment.