Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing argument to ghdl_sim.sh - bug? #70

Closed
stnolting opened this issue Jun 11, 2021 · 2 comments
Closed

Passing argument to ghdl_sim.sh - bug? #70

stnolting opened this issue Jun 11, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@stnolting
Copy link
Owner

@umarcor

Currently, the riscv-arch-test worklfow does not work.

I think there might be a problem here:

# Simulation time define by user?
echo ""
[ -z ${1} ] && echo "Using default simulation config: $SIM_CONFIG" || (
SIM_CONFIG=$1;
echo "Using user simulation config: $SIM_CONFIG";
)

When passing the max. simulation time from a makefile, SIM_CONFIG does not seem to be updated globally.

sh $(NEORV32_LOCAL_COPY)/sim/ghdl/ghdl_sim.sh --stop-time=$(SIM_TIME) >> /dev/null; \

Hence the simulation runs for the default time (8ms) - which would take ages for the riscv-arch-test to complete. When I use the code below for ghdl_sim.sh it seems to work.

if [ -z $1 ]
then
  echo "Using default simulation config: $SIM_CONFIG"
else
  echo $1;
  SIM_CONFIG=$1;
  echo "Using user simulation config: $SIM_CONFIG";
fi

I am not a bash expert, though. Where is the difference? Does the updated code do anything that my workaround does not?! 🤔

@umarcor
Copy link
Collaborator

umarcor commented Jun 11, 2021

@stnolting, my bad. I didn't realise that SIM_CONFIG is kept local. I guess we can either export it in L22, or change it to your style. As you wish.

@stnolting stnolting added the bug Something isn't working label Jun 11, 2021
@stnolting
Copy link
Owner Author

No problem!
I will update that. Hopefully nothing else breaks 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants