1
1
# Quartz
2
2
3
- Quartz is a collection of soft-logic designs and hardware abstraction libraries (HALs) for various
4
- subsystems found in Oxide hardware. This includes components such as Ignition, power sequencing for
5
- system boards and QSFP interface management.
6
-
7
- Quartz leans heavily on [ Cobalt] ( https://github.com/oxidecomputer/cobalt ) and unless a component is
8
- experimental or specific to an Oxide system, our posture should be to push as much into that project
9
- as possible. Having said that, it is acceptable to prototype in private under the Quartz project and
10
- move something to Cobalt once deemed ready.
3
+ Quartz is a collection of soft-logic designs and hardware abstraction libraries
4
+ (HALs) for various subsystems found in Oxide hardware. This includes components
5
+ such as Ignition, power sequencing for system boards and QSFP interface
6
+ management.
11
7
12
8
# Cloning instructions
13
9
Note that cobble is a submodule of cobalt which is used as a submodule here.
@@ -23,18 +19,64 @@ or if already checked out:
23
19
```
24
20
25
21
# Build system help
26
- At the root of the Quartz directory, the BUILD.vars file controls machine-specific paths.
27
- It is recommended that you copy the BUILD.vars.example and adapt for your system paths.
28
- Typically this involves adjusting the [ bluespec] [ yosys] [ nextpnr] sections to point to the tooling in your environment.
22
+ In the long-term, we're migrating to buck2 as out build system but until we have
23
+ reached parity, we are supporting designs that started using cobble still with
24
+ cobble and new design flows using buck2.
25
+
26
+ ## Cobble-based builds
27
+ Currently the cobble build chain supports BSV designs and RDL generate
28
+ targetting the yosys toolchain.
29
+
30
+ If you're looking for getting started with a cobble-based build see
31
+ [ instructions] ( COBALT_README.md ) as well as some further tips
32
+ [ here] ( hdl/projects/gimlet/sequencer/README.md ) At the root of the Quartz
33
+ directory, the BUILD.vars file controls machine-specific paths. It is
34
+ recommended that you copy the BUILD.vars.example and adapt for your system
35
+ paths. Typically this involves adjusting the [ bluespec] [ yosys] [ nextpnr]
36
+ sections to point to the tooling in your environment.
37
+
38
+ ### Adding new source files
39
+ In each folder that is scanned, there is a BUILD file that includes the
40
+ information for cobble to determine build targets and a complete dependency
41
+ tree. In general, bluespec files get added as individual bluespec libraries,
42
+ bluespec simulation targets get added as a bluespec_sim target, and
43
+ bluesim_binary target.
44
+
45
+ For top-level designs that would synthesize to an FPGA, a bluespec_verilog
46
+ target, a yosys_design target and a nextpnr target are needed to properly
47
+ generate bitstreams.
48
+
49
+ ### Adding new hardware targets
50
+ To add support for a totally new chip design, a new "environment" in cobble
51
+ parlance has to be created. This is done up at the root of the quartz repo in
52
+ the BUILD.conf file.
53
+
54
+ ## buck2 builds
55
+ This area is under active development, currently supporting VHDL and RDL flows
56
+ into VUnit simulations. FPGA toolchain support, and BSV support needs to be
57
+ fleshed out.
58
+
59
+ The docker image does not currently contain buck2 executables.
60
+
61
+ For information on building ` BUCK ` files see [ here] ( BUCK_RULES.md )
62
+
63
+ ### Prerequisites
64
+ - You need a copy of buck2 built locally. [ Instructions] ( https://buck2.build/docs/getting_started/ )
65
+ - You'll need python3/pip installed and accessible on your path. We have python 3.10
66
+ working in linux, and python 3.12 working in windows. Python 3.9 did not work in
67
+ windows at least, we have no other data points on other python versions.
68
+ - You'll need to install required python packages ` pip install -r tools/requirements.txt `
69
+ - You'll need to have GHDL installed and on your path (in linux this comes with
70
+ the oss-cad-suite, but oss-cad-suite windows builds don't build GHDL). As of
71
+ Jan '24, the ghdl-MINGW32 bit nightly version was working in windows.
29
72
30
- ## Adding new source files
31
- In each folder that is scanned, there is a BUILD file that includes the information for cobble to determine build targets
32
- and a complete dependency tree. In general, bluespec files get added as individual bluespec libraries, bluespec simulation targets get added
33
- as a bluespec_sim target, and bluesim_binary target.
73
+ :warning : ** Windows Users** : You need to be in Developer Mode for buck2 to be
74
+ able to use symlinks, and should consider setting ` LongPathsEnabled ` in regedit at
75
+ ` HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem ` to 1 and rebooting.
34
76
35
- For top-level designs that would synthesize to an FPGA, a bluespec_verilog target, a yosys_design target and a nextpnr target are needed to
36
- properly generate bitstreams.
77
+ ### buck2 run
78
+ Comprehensive buck2 command line guidance is out of the scope of this document
79
+ but if you want to see a list of all available buck2 targets you can do: ` buck2 ctargets /... `
37
80
38
- ## Adding new hardware targets
39
- To add support for a totally new chip design, a new "environment" in cobble parlance has to be created. This is done up at the root of the
40
- quartz repo in the BUILD.conf file.
81
+ To run a simulation, pick one of the testbench targets and ` buck2 run <target> ` you may do
82
+ ` -- <vunit args> ` if you need to pass arguments into VUnit.
0 commit comments