simer

module
v0.0.0-...-fc9c9c6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2024 License: Apache-2.0

README

SIMER : Simulation Runner

Containerised simulation run-time.

Usage

# Define a shell function (or add to .profile file).
$ simer() { ( cd "$1" && shift && docker run -it --rm -v $(pwd):/sim simer:test "$@"; ) }

# Run the simulation.
$ simer dse/modelc/build/_out/examples/minimal -endtime 0.04

Integration Testing

Building Artifacts
# Clear the Simer build folder.
$ rm -rvf extra/tools/simer/build/stage

# Build x32 targets.
$ make cleanall
$ PACKAGE_ARCH=linux-x86 make build simer

# Build x64 targets.
$ make cleanall
$ make build simer

# Modify the filesystem (of the example model) for testing.
$ mkdir -p dse/modelc/build/_out/examples/simer/lib32
$ cp extra/tools/simer/build/stage/lib32/libcounter.so dse/modelc/build/_out/examples/simer/lib32/libcounter.so

# Build the Simer container.
$ ls extra/tools/simer/build/stage/*
$ make tools
Native Testing
$ cd extra/tools/simer
$ make run_noredis
Container Testing
$ simer() { ( cd "$1" && shift && docker run -it --rm -v $(pwd):/sim simer:test "$@"; ) }
$ simer dse/modelc/build/_out/examples/simer -endtime 0.04

Development

Go Module Update (schema updates)
$ export GOPRIVATE=github.com/boschglobal
$ go clean -modcache
$ go mod tidy
$ go get -x github.com/boschglobal/dse.schemas/code/go/dse@v1.2.6

Note: Release Tags for modules in DSE Schemas are according to the schema code/go/dse/v1.2.6.

Container Debug
# Start the container.
$ docker run --entrypoint /bin/bash -it --rm -v .:/sim simer:test

# Check Redis operation.
$ /usr/local/bin/redis-server /usr/local/etc/redis/redis.conf
$ /usr/local/bin/redis-server /usr/local/etc/redis/redis.conf &
$ /usr/local/bin/redis-cli -h localhost

# Check Simer/Tool operation
# (Modify /etc/hosts before running the following commands)
$ /usr/local/bin/simer
$ /usr/local/bin/simbus

Directories

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL