From: Luke Kenneth Casson Leighton Date: Thu, 1 Apr 2021 16:41:40 +0000 (+0100) Subject: sort out Makefile for building X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b82f6c1c24d72900b539c67afb91972a2a65d528;p=soc-cocotb-sim.git sort out Makefile for building --- diff --git a/ls180/Makefile b/ls180/Makefile index 66c70a2..adfd328 100644 --- a/ls180/Makefile +++ b/ls180/Makefile @@ -1,24 +1,20 @@ -.PHONY: all +.PHONY: all corona prepare cocotb -# for running VASY in coriolis2 chroot. setup: -# https://git.libre-soc.org/?p=dev-env-setup.git;a=blob;f=coriolis2-chroot;hb=HEAD -VASY ?= schroot -c coriolis -d /tmp /home/lkcl/alliance/install/bin/vasy +all: prepare cocotb -nsxlib_vbe=$(wildcard *.vbe) -nsxlib_vst=$(patsubst %.vbe,%.vhd,$(wildcard *.vhd)) -SPOT=$(addsuffix .vbe, $(basename $(wildcard *.vhd))) +# gets the nsxlib and niolib files, and munges the contents of vst_src +prepare: + ./vbe2vst.py + ./vst_correct.py -%.vbe : %.vhd - $(VASY) -s -I vbe $^ -o $@ - mv $@.vhd $@ - -all : $(nsxlib_vst) - echo $(SPOT) - echo $(nsxlib_vbe) - echo $(nsxlib_vst) +# runs cocotb test +cocotb: + (cd cocotb && ./run_ghdl.sh) +# builds just for fun (double-check) ghdl works corona: + ./vhd2obj.py (cd obj && ghdl -e -g --std=08 corona) (cd obj && ghdl -r -g --std=08 corona) diff --git a/ls180/vbe2vst.py b/ls180/vbe2vst.py old mode 100644 new mode 100755 diff --git a/ls180/vhd2obj.py b/ls180/vhd2obj.py old mode 100644 new mode 100755 diff --git a/ls180/vst_correct.py b/ls180/vst_correct.py old mode 100644 new mode 100755