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

[release] fix docker image builder #942

Merged
merged 6 commits into from
Jan 20, 2025
Merged

[release] fix docker image builder #942

merged 6 commits into from
Jan 20, 2025

Conversation

Avimitin
Copy link
Contributor

No description provided.

@Avimitin Avimitin force-pushed the docker branch 13 times, most recently from 206076a to a072727 Compare January 15, 2025 12:22
@Avimitin
Copy link
Contributor Author

Avimitin commented Jan 15, 2025

How to use the docker image:

Note

Make sure machine have at least 4 usable cores.

# change these variable to fit the needs.
config=blastoise
ip=t1emu
docker pull ghcr.io/chipsalliance/t1-${config}-${ip}:latest
docker run --name t1 -it --rm ghcr.io/chipsalliance/t1-${config}-${ip}:latest /bin/bash

Inside docker shell, there are four sample source code in /workspace/examples directory. T1 runtime stub are placed under /workspace/share. This docker container ship with a clang wrapper that already handles most of the compiler options, so users can easily compile the example source code, as the following code block shows:

cd /workspace/intrinsic.linear_normalization
ls -al
t1-cc -T /workspace/share/t1.ld linear_normalization.c /workspace/share/main.S -o linear_normalization.elf
t1emu-verilated-simulator +t1_elf_file=linear_normalization.elf

Command explain

  • The t1-cc wraps the following clang option:
riscv32-none-elf-clang -I/path/to/t1-runtime/include -L/path/to/t1-runtime/lib -mabi=ilp32f -march=rv32gc_zvl2048b_zve32f -mno-relax -static -mcmodel=medany -fvisibility=hidden -fno-PIC -g -O3 -frandom-seed=<random string>
  • simulator binary can differ across container. The t1emu-verilated-simulator handle scalar instruction with Spike and t1rocketemu-verilated-simulator use the Rocket core.

@sequencer
Copy link
Member

Please cherry-pick #942 to see if the emulator issue has been resolved.
There should also be a readme.txt in the root dir of the docker image.

@FanShupei FanShupei merged commit d1088b8 into master Jan 20, 2025
193 checks passed
@FanShupei FanShupei deleted the docker branch January 20, 2025 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants