-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests the bare minimum: whether HDL can be generated using Clash
- Loading branch information
1 parent
58568da
commit 088bf7d
Showing
8 changed files
with
57 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,3 +68,6 @@ tight_setup_hold_pins.txt | |
|
||
# Verilator debug output | ||
simulation_dump.vcd | ||
|
||
# Clash output | ||
verilog |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,10 @@ | ||
-- SPDX-FileCopyrightText: 2023 Google LLC | ||
-- SPDX-FileCopyrightText: 2023-2024 Google LLC | ||
-- | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
|
||
import Clash.Prelude | ||
import Clash.Annotations.TH | ||
import Prelude | ||
|
||
import VexRiscv | ||
|
||
circuit :: | ||
"CLK" ::: Clock System -> | ||
"RST" ::: Reset System -> | ||
"CPU_COMB_INPUT" ::: Signal System CpuIn -> | ||
"JTAG_IN_" ::: Signal System JtagIn -> | ||
"" ::: | ||
( "CPU_OUTPUT" ::: Signal System CpuOut | ||
, "JTAG_OUT_" ::: Signal System JtagOut) | ||
circuit clk rst input jtagIn = | ||
vexRiscv clk rst input jtagIn | ||
|
||
makeTopEntity 'circuit | ||
import qualified Clash.Main as Clash | ||
|
||
main :: IO () | ||
main = pure () | ||
main = Clash.defaultMain ["Utils.Instance", "-main-is", "circuit", "--verilog"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
-- SPDX-FileCopyrightText: 2024 Google LLC | ||
-- | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
{-# LANGUAGE CPP #-} | ||
|
||
-- | A dummy instance to test whether Clash can generate HDL for the VexRiscv | ||
module Utils.Instance where | ||
|
||
import Clash.Prelude | ||
import Clash.Annotations.TH | ||
|
||
import VexRiscv | ||
|
||
circuit :: | ||
"CLK" ::: Clock System -> | ||
"RST" ::: Reset System -> | ||
"CPU_IN" ::: Signal System CpuIn -> | ||
"JTAG_IN" ::: Signal System JtagIn -> | ||
"" ::: | ||
( "CPU_OUTPUT" ::: Signal System CpuOut | ||
, "JTAG_OUT" ::: Signal System JtagOut ) | ||
circuit clk rst input jtagIn = | ||
vexRiscv clk rst input jtagIn | ||
{-# CLASH_OPAQUE circuit #-} | ||
makeTopEntity 'circuit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters