forked from libre-chip/fayalite
Compare commits
9 commits
4725880946
...
52c62f87eb
| Author | SHA1 | Date | |
|---|---|---|---|
| 52c62f87eb | |||
| 338ce7ed32 | |||
| 0306d3b07d | |||
| f152d3e5f3 | |||
| 01ba321014 | |||
| 90aed1615e | |||
| ecc5ffd9eb | |||
| cec0eb410e | |||
| 64ec6c0dcc |
5 changed files with 79 additions and 12 deletions
|
|
@ -12,10 +12,10 @@ jobs:
|
|||
outputs:
|
||||
cache-primary-key: ${{ steps.restore-deps.outputs.cache-primary-key }}
|
||||
steps:
|
||||
- uses: https://git.libre-chip.org/mirrors/checkout@v3
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: https://git.libre-chip.org/mirrors/cache/restore@v3
|
||||
- uses: actions/cache/restore@v3
|
||||
id: restore-deps
|
||||
with:
|
||||
path: deps
|
||||
|
|
@ -30,22 +30,71 @@ jobs:
|
|||
build-essential \
|
||||
ccache \
|
||||
clang \
|
||||
cmake \
|
||||
cvc5 \
|
||||
default-jre-headless \
|
||||
flex \
|
||||
gawk \
|
||||
g++ \
|
||||
gawk \
|
||||
git \
|
||||
libantlr4-runtime-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-iostreams-dev \
|
||||
libboost-program-options-dev \
|
||||
libboost-python-dev \
|
||||
libboost-system-dev \
|
||||
libboost-thread-dev \
|
||||
libeigen3-dev \
|
||||
libffi-dev \
|
||||
libreadline-dev \
|
||||
lld \
|
||||
openfpgaloader \
|
||||
pkg-config \
|
||||
python3 \
|
||||
python3-click \
|
||||
python3-venv \
|
||||
tcl-dev \
|
||||
uuid-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
|
||||
if: steps.restore-deps.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
|
|
@ -70,7 +119,7 @@ jobs:
|
|||
run: |
|
||||
git clone --depth=1 --recursive --branch=0.45 https://git.libre-chip.org/mirrors/yosys deps/yosys
|
||||
make -C deps/yosys -j"$(nproc)"
|
||||
- uses: https://git.libre-chip.org/mirrors/cache/save@v3
|
||||
- uses: actions/cache/save@v3
|
||||
if: steps.restore-deps.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: deps
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ jobs:
|
|||
runs-on: debian-12
|
||||
needs: deps
|
||||
steps:
|
||||
- uses: https://git.libre-chip.org/mirrors/checkout@v3
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- run: |
|
||||
|
|
@ -43,7 +43,7 @@ jobs:
|
|||
source "$HOME/.cargo/env"
|
||||
rustup component add rust-src
|
||||
echo "$PATH" >> "$GITHUB_PATH"
|
||||
- uses: https://git.libre-chip.org/mirrors/cache/restore@v3
|
||||
- uses: actions/cache/restore@v3
|
||||
with:
|
||||
path: deps
|
||||
key: ${{ needs.deps.outputs.cache-primary-key }}
|
||||
|
|
|
|||
|
|
@ -1044,7 +1044,12 @@ impl<T: ExternalCommand> JobKind for ExternalCommandJobKind<T> {
|
|||
params: &JobParams,
|
||||
acquired_job: &mut AcquiredJob,
|
||||
) -> eyre::Result<Vec<JobItem>> {
|
||||
assert!(inputs.iter().map(JobItem::name).eq(job.inputs()));
|
||||
assert!(
|
||||
inputs.iter().map(JobItem::name).eq(job.inputs()),
|
||||
"{}\ninputs:\n{inputs:?}\njob.inputs():\n{:?}",
|
||||
std::any::type_name::<Self>(),
|
||||
job.inputs(),
|
||||
);
|
||||
let CommandParams {
|
||||
command_line,
|
||||
current_dir,
|
||||
|
|
|
|||
|
|
@ -726,8 +726,8 @@ impl JobGraph {
|
|||
let running_job_in_thread = RunningJobInThread {
|
||||
job_node_id,
|
||||
job: job.clone(),
|
||||
inputs: Result::from_iter(inputs.into_iter().map(|(input_name, input)| {
|
||||
input.into_inner().wrap_err_with(|| {
|
||||
inputs: Result::from_iter(job.inputs().iter().map(|input_name| {
|
||||
inputs.get(input_name).and_then(|v| v.get().cloned()).wrap_err_with(|| {
|
||||
eyre!("failed when trying to run job {name}: nothing provided the input item: {input_name:?}")
|
||||
})
|
||||
}))?,
|
||||
|
|
|
|||
|
|
@ -361,10 +361,23 @@ impl JobKind for YosysNextpnrXrayWriteXdcFileJobKind {
|
|||
self,
|
||||
job: &Self::Job,
|
||||
inputs: &[JobItem],
|
||||
params: &JobParams,
|
||||
acquired_job: &mut AcquiredJob,
|
||||
_params: &JobParams,
|
||||
_acquired_job: &mut AcquiredJob,
|
||||
) -> eyre::Result<Vec<JobItem>> {
|
||||
todo!()
|
||||
assert!(inputs.iter().map(JobItem::name).eq(self.inputs(job)));
|
||||
// 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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue