forked from libre-chip/fayalite
Compare commits
7 commits
52c62f87eb
...
4725880946
| Author | SHA1 | Date | |
|---|---|---|---|
| 4725880946 | |||
| 9745058a5a | |||
| cb75aae78e | |||
| 34e512df1c | |||
| a823f8485b | |||
| e34acc8fee | |||
| 85dfc8117d |
5 changed files with 12 additions and 79 deletions
|
|
@ -12,10 +12,10 @@ jobs:
|
||||||
outputs:
|
outputs:
|
||||||
cache-primary-key: ${{ steps.restore-deps.outputs.cache-primary-key }}
|
cache-primary-key: ${{ steps.restore-deps.outputs.cache-primary-key }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: https://git.libre-chip.org/mirrors/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/cache/restore@v3
|
- uses: https://git.libre-chip.org/mirrors/cache/restore@v3
|
||||||
id: restore-deps
|
id: restore-deps
|
||||||
with:
|
with:
|
||||||
path: deps
|
path: deps
|
||||||
|
|
@ -30,71 +30,22 @@ jobs:
|
||||||
build-essential \
|
build-essential \
|
||||||
ccache \
|
ccache \
|
||||||
clang \
|
clang \
|
||||||
cmake \
|
|
||||||
cvc5 \
|
cvc5 \
|
||||||
default-jre-headless \
|
|
||||||
flex \
|
flex \
|
||||||
g++ \
|
|
||||||
gawk \
|
gawk \
|
||||||
|
g++ \
|
||||||
git \
|
git \
|
||||||
libantlr4-runtime-dev \
|
|
||||||
libboost-filesystem-dev \
|
libboost-filesystem-dev \
|
||||||
libboost-iostreams-dev \
|
|
||||||
libboost-program-options-dev \
|
|
||||||
libboost-python-dev \
|
libboost-python-dev \
|
||||||
libboost-system-dev \
|
libboost-system-dev \
|
||||||
libboost-thread-dev \
|
|
||||||
libeigen3-dev \
|
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
libreadline-dev \
|
libreadline-dev \
|
||||||
lld \
|
lld \
|
||||||
openfpgaloader \
|
|
||||||
pkg-config \
|
pkg-config \
|
||||||
python3 \
|
python3 \
|
||||||
python3-click \
|
python3-click \
|
||||||
python3-venv \
|
|
||||||
tcl-dev \
|
tcl-dev \
|
||||||
uuid-dev \
|
|
||||||
zlib1g-dev
|
zlib1g-dev
|
||||||
- name: Create venv
|
|
||||||
if: steps.restore-deps.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
|
||||||
python3 -m venv deps/venv
|
|
||||||
source deps/venv/bin/activate
|
|
||||||
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $FORGEJO_ENV
|
|
||||||
echo "$VIRTUAL_ENV/bin" >> $FORGEJO_PATH
|
|
||||||
- name: Build prjxray
|
|
||||||
if: steps.restore-deps.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
|
||||||
git clone https://github.com/SymbiFlow/prjxray.git deps/prjxray
|
|
||||||
(cd deps/prjxray; git checkout c9f02d8576042325425824647ab5555b1bc77833)
|
|
||||||
(cd deps/prjxray; git submodule update --init --recursive)
|
|
||||||
mkdir -p deps/prjxray/build
|
|
||||||
(cd deps/prjxray/build; cmake ..)
|
|
||||||
(cd deps/prjxray/build; make -j$(nproc))
|
|
||||||
(cd deps/prjxray/build; make install)
|
|
||||||
(cd deps/prjxray; pip install -r requirements.txt)
|
|
||||||
- name: Get prjxray-db
|
|
||||||
if: steps.restore-deps.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
|
||||||
git clone https://github.com/openXC7/prjxray-db.git deps/prjxray-db
|
|
||||||
(cd deps/prjxray-db; git checkout 381966a746cb4cf4a7f854f0e53caa3bf74fbe62)
|
|
||||||
- name: Build xcfasm
|
|
||||||
if: steps.restore-deps.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
|
||||||
git clone https://github.com/chipsalliance/f4pga-xc-fasm.git deps/f4pga-xc-fasm
|
|
||||||
(cd deps/f4pga-xc-fasm; git checkout 25dc605c9c0896204f0c3425b52a332034cf5e5c)
|
|
||||||
(cd deps/f4pga-xc-fasm; pip install -e .)
|
|
||||||
- name: Build nextpnr-xilinx
|
|
||||||
if: steps.restore-deps.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
|
||||||
git clone https://github.com/openXC7/nextpnr-xilinx.git deps/nextpnr-xilinx
|
|
||||||
(cd deps/nextpnr-xilinx; git checkout 724db28b41e68568690a5ea1dd9ce5082362bb91)
|
|
||||||
(cd deps/nextpnr-xilinx; git submodule update --init --recursive)
|
|
||||||
mkdir -p deps/nextpnr-xilinx/build
|
|
||||||
(cd deps/nextpnr-xilinx/build; cmake -DARCH=xilinx -DUSE_OPENMP=ON -DBUILD_GUI=OFF ..)
|
|
||||||
(cd deps/nextpnr-xilinx/build; make -j$(nproc))
|
|
||||||
(cd deps/nextpnr-xilinx/build; make install)
|
|
||||||
- name: Install Firtool
|
- name: Install Firtool
|
||||||
if: steps.restore-deps.outputs.cache-hit != 'true'
|
if: steps.restore-deps.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -119,7 +70,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
git clone --depth=1 --recursive --branch=0.45 https://git.libre-chip.org/mirrors/yosys deps/yosys
|
git clone --depth=1 --recursive --branch=0.45 https://git.libre-chip.org/mirrors/yosys deps/yosys
|
||||||
make -C deps/yosys -j"$(nproc)"
|
make -C deps/yosys -j"$(nproc)"
|
||||||
- uses: actions/cache/save@v3
|
- uses: https://git.libre-chip.org/mirrors/cache/save@v3
|
||||||
if: steps.restore-deps.outputs.cache-hit != 'true'
|
if: steps.restore-deps.outputs.cache-hit != 'true'
|
||||||
with:
|
with:
|
||||||
path: deps
|
path: deps
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ jobs:
|
||||||
runs-on: debian-12
|
runs-on: debian-12
|
||||||
needs: deps
|
needs: deps
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: https://git.libre-chip.org/mirrors/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- run: |
|
- run: |
|
||||||
|
|
@ -43,7 +43,7 @@ jobs:
|
||||||
source "$HOME/.cargo/env"
|
source "$HOME/.cargo/env"
|
||||||
rustup component add rust-src
|
rustup component add rust-src
|
||||||
echo "$PATH" >> "$GITHUB_PATH"
|
echo "$PATH" >> "$GITHUB_PATH"
|
||||||
- uses: actions/cache/restore@v3
|
- uses: https://git.libre-chip.org/mirrors/cache/restore@v3
|
||||||
with:
|
with:
|
||||||
path: deps
|
path: deps
|
||||||
key: ${{ needs.deps.outputs.cache-primary-key }}
|
key: ${{ needs.deps.outputs.cache-primary-key }}
|
||||||
|
|
|
||||||
|
|
@ -1044,12 +1044,7 @@ impl<T: ExternalCommand> JobKind for ExternalCommandJobKind<T> {
|
||||||
params: &JobParams,
|
params: &JobParams,
|
||||||
acquired_job: &mut AcquiredJob,
|
acquired_job: &mut AcquiredJob,
|
||||||
) -> eyre::Result<Vec<JobItem>> {
|
) -> eyre::Result<Vec<JobItem>> {
|
||||||
assert!(
|
assert!(inputs.iter().map(JobItem::name).eq(job.inputs()));
|
||||||
inputs.iter().map(JobItem::name).eq(job.inputs()),
|
|
||||||
"{}\ninputs:\n{inputs:?}\njob.inputs():\n{:?}",
|
|
||||||
std::any::type_name::<Self>(),
|
|
||||||
job.inputs(),
|
|
||||||
);
|
|
||||||
let CommandParams {
|
let CommandParams {
|
||||||
command_line,
|
command_line,
|
||||||
current_dir,
|
current_dir,
|
||||||
|
|
|
||||||
|
|
@ -726,8 +726,8 @@ impl JobGraph {
|
||||||
let running_job_in_thread = RunningJobInThread {
|
let running_job_in_thread = RunningJobInThread {
|
||||||
job_node_id,
|
job_node_id,
|
||||||
job: job.clone(),
|
job: job.clone(),
|
||||||
inputs: Result::from_iter(job.inputs().iter().map(|input_name| {
|
inputs: Result::from_iter(inputs.into_iter().map(|(input_name, input)| {
|
||||||
inputs.get(input_name).and_then(|v| v.get().cloned()).wrap_err_with(|| {
|
input.into_inner().wrap_err_with(|| {
|
||||||
eyre!("failed when trying to run job {name}: nothing provided the input item: {input_name:?}")
|
eyre!("failed when trying to run job {name}: nothing provided the input item: {input_name:?}")
|
||||||
})
|
})
|
||||||
}))?,
|
}))?,
|
||||||
|
|
|
||||||
|
|
@ -361,23 +361,10 @@ impl JobKind for YosysNextpnrXrayWriteXdcFileJobKind {
|
||||||
self,
|
self,
|
||||||
job: &Self::Job,
|
job: &Self::Job,
|
||||||
inputs: &[JobItem],
|
inputs: &[JobItem],
|
||||||
_params: &JobParams,
|
params: &JobParams,
|
||||||
_acquired_job: &mut AcquiredJob,
|
acquired_job: &mut AcquiredJob,
|
||||||
) -> eyre::Result<Vec<JobItem>> {
|
) -> eyre::Result<Vec<JobItem>> {
|
||||||
assert!(inputs.iter().map(JobItem::name).eq(self.inputs(job)));
|
todo!()
|
||||||
// TODO: create actual .xdc from input module
|
|
||||||
std::fs::write(
|
|
||||||
job.xdc_file,
|
|
||||||
r"# autogenerated
|
|
||||||
set_property LOC G6 [get_ports led]
|
|
||||||
set_property IOSTANDARD LVCMOS33 [get_ports led]
|
|
||||||
set_property LOC E3 [get_ports clk]
|
|
||||||
set_property IOSTANDARD LVCMOS33 [get_ports clk]
|
|
||||||
set_property LOC C2 [get_ports rst]
|
|
||||||
set_property IOSTANDARD LVCMOS33 [get_ports rst]
|
|
||||||
",
|
|
||||||
)?;
|
|
||||||
Ok(vec![JobItem::Path { path: job.xdc_file }])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn subcommand_hidden(self) -> bool {
|
fn subcommand_hidden(self) -> bool {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue