Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Debugging `make: 'run' is up to date.`

coshy

Member level 4
Joined
Mar 28, 2016
Messages
75
Helped
0
Reputation
0
Reaction score
1
Trophy points
1,288
Activity points
1,771
Trying to make a Makefile to compile and run a verilog code.

Makefile:

Code:
.PHONY: compile run

compile:
Code:
vcs -sverilog -debug_access+all test.sv

run
./simv +TEST_ARG +CLOCK= 1.66

When I type 'make', the message is make run is up to date.
but I expected that compile and run sequentially execute when I type 'make'.

How to debug this ?
 
Last edited by a moderator:
this has nothing to do with verilog or verilog simulatoin, that is how make works. it only does something if an input has "changed". you need a Make tutorial
 
You only have a part of the makefile, it is hard to check. The idea of make is you have the targets and the dependencies. Unfortunately there is not much in debugging. You have "make -d" that will try to tell you why it is making decisions and "make -n" that will tell you what it will do but not do it.

In this case, the first target is "run", so if you just type "make" it will assume you typed "make run".

run: compile
<tab>ncsim ....

compile:
<tab>ncvlog ....

The default behaviour is for make to build targets, so what is behind the colon is assumed to be a file name that will be complied and what is after the column is presumed to be the source files needed for the compilation. In fact some simulators use makefiles to do an incremental compilation for you and speed things up.

In your case, you are using make as a simple script with a menu, so "run" and "compile" are just targets and not actual files. Still, the tool will assume that the first rule is to build a file called "run" that depends on a file called "compile" and the second rule is to build a file called "compile". So it will check to see if there is a file called "compile". If there is it will check the timestamp versus the dependencies. If there are none just having the file there will consider it up to date. If you type "make run" then it will look for a file called compile, as run depends on compile.

This is what the .PHONY is for. It tells the tool not to see if the target is there, just execute it anytime it is there. So the corrected code would be like you said.

.PHONY: run compile
run: compile
<tab>ncsim ....

compile:
<tab>ncvlog ....

If you got "run is up to date". That tells me that there is a file called run in the current directory, so it did not run because it thought it was ready. Just a guess though. It is odd that the .PHONY should tell the tool not to do that. Make sure the targets are spelled right, the PHONY tag is correct too and there are no files with the name run or compile. Also make sure there is a tab indentin the commands and NO OTHER TAB before other lines. Make assumes all indented lines are commands to execute and non-indented tabs are targets, variables, etc
 
Last edited:

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top