Skip to content

Commit 1155d5f

Browse files
authored
Merge branch 'main' into str-type-append
2 parents a6a5a3e + a67cac8 commit 1155d5f

File tree

60 files changed

+880
-1551
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+880
-1551
lines changed

.github/workflows/build-and-test-macos.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ jobs:
9191
ghcup install hls ${{ inputs.hls_version }}
9292
macos_ver=$(sw_vers -productVersion | cut -d '.' -f 1)
9393
if [ "$macos_ver" -ge "14" ]; then
94-
brew install pyyaml
94+
python3 -m venv ./venv
95+
source ./venv/bin/activate
96+
python3 -m pip install pyyaml
9597
else
9698
pip3 install pyyaml
9799
fi

.github/workflows/ci.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,21 @@ jobs:
4242
uses: ./.github/workflows/build-and-test-ubuntu.yml
4343
with:
4444
os: ${{ matrix.os }}
45-
ghc_version: 9.6.5
46-
hls_version: 2.8.0.0
45+
ghc_version: 9.6.6
46+
hls_version: 2.9.0.1
4747
secrets: inherit
4848

4949
build-and-test-macos:
5050
strategy:
5151
matrix:
52-
os: [ macos-12, macos-13, macos-14 ]
52+
os: [ macos-13, macos-14, macos-15 ]
5353
fail-fast: false
5454
name: "Build/Test: ${{ matrix.os }}"
5555
uses: ./.github/workflows/build-and-test-macos.yml
5656
with:
5757
os: ${{ matrix.os }}
58-
ghc_version: 9.6.5
59-
hls_version: 2.8.0.0
58+
ghc_version: 9.6.6
59+
hls_version: 2.9.0.1
6060
secrets: inherit
6161

6262
# ------------------------------
@@ -68,10 +68,12 @@ jobs:
6868
matrix:
6969
ghc:
7070
- version: 9.4.8
71-
hls: 2.7.0.0
72-
- version: 9.8.2
73-
hls: 2.7.0.0
71+
hls: 2.9.0.1
72+
- version: 9.8.4
73+
hls:
7474
- version: 9.10.1
75+
hls: 2.9.0.1
76+
- version: 9.12.1
7577
hls:
7678
name: "Build/Test: GHC Ubuntu"
7779
uses: ./.github/workflows/build-and-test-ubuntu.yml
@@ -86,10 +88,12 @@ jobs:
8688
matrix:
8789
ghc:
8890
- version: 9.4.8
89-
hls: 2.7.0.0
90-
- version: 9.8.2
91-
hls: 2.7.0.0
91+
hls: 2.9.0.1
92+
- version: 9.8.4
93+
hls:
9294
- version: 9.10.1
95+
hls: 2.9.0.1
96+
- version: 9.12.1
9397
hls:
9498
name: "Build/Test: GHC macOS"
9599
uses: ./.github/workflows/build-and-test-macos.yml
@@ -143,7 +147,7 @@ jobs:
143147
build-doc-macOS:
144148
strategy:
145149
matrix:
146-
os: [ macos-12, macos-13, macos-14 ]
150+
os: [ macos-13, macos-14, macos-15 ]
147151
fail-fast: false
148152
name: "Build doc: ${{ matrix.os }}"
149153
runs-on: ${{ matrix.os }}

.github/workflows/install_dependencies_doc_macos.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,14 @@
22

33
brew update
44

5-
brew install mactex-no-gui
5+
# The install of 'texlive' may cause the install of a newer version of
6+
# 'python', which could fail because it cannot overwrite links for
7+
# older versions, due to an issue with the GitHub runner images:
8+
# https://github.com/actions/runner-images/issues/9966
9+
# To avoid that, we unlink and install with overwrite:
10+
#
11+
for python_package in $(brew list | grep python@); do
12+
brew unlink ${python_package} && brew link --overwrite ${python_package}
13+
done
14+
15+
brew install texlive

DEVELOP.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
<div class="title-block" style="text-align: center;" align="center">
2+
3+
# Bluespec Compiler - Information for developers
4+
5+
---
6+
7+
</div>
8+
9+
Here you can find documentation on the internal architecture of [BSC](./README.md)
10+
and other helpful information for people who want to contribute to the source code.
11+
12+
Feel free to ask questions on GitHub (in an Issue or a Discussion)
13+
or on the [`bsc-dev`](https://groups.io/g/bsc-dev) mailing list.
14+
The `bsc-dev` list is for questions that are only relevant to developers,
15+
to keep traffic on the [`b-lang-discuss`](https://groups.io/g/b-lang-discuss)
16+
mailing list light for people who are just users.
17+
18+
---
19+
20+
At the moment there is no formal documentation.
21+
However, there are written responses to questions on GitHub and the mailing lists,
22+
that can someday be collected and turned into a document.
23+
The following is a running list of those writings.
24+
25+
### Basics / General info
26+
27+
* [BSC is a series of stages](https://groups.io/g/bsc-dev/message/14)
28+
* This write-up includes a link to the following (incomplete)
29+
[diagrams of the BSC stages](https://docs.google.com/document/d/1130fyOsPtS6gMppB6BaO-qVXxzO5b_ha7sXwLdd8Dtg/edit?usp=sharing)
30+
* See also [this brief breakdown of BSC](https://groups.io/g/b-lang-discuss/message/358)
31+
by its three internal representations (CSyntax, ISyntax, ASyntax)
32+
* Briefly on [printing and dumping from BSC and intermediate files](https://groups.io/g/b-lang-discuss/message/356)
33+
* [More on the stages, the backend split, Bluesim stages, and the structure of Bluesim output](https://github.com/B-Lang-org/bsc/issues/743#issuecomment-2436483892)
34+
* [The meaning of `.bo` and `.ba` files and compiler flow](https://github.com/B-Lang-org/bsc/discussions/575#discussioncomment-6458212)
35+
* Hidden flags
36+
* BSC has a flag `-help-hidden` for developers,
37+
which shows more information than the `-help` for users
38+
* Like the LaTeX documentation for flags in the BSC User Guide,
39+
there is short LaTeX document for hidden flags at BS Inc (called `internal-user-guide`),
40+
which could become part of a BSC Developer Guide
41+
42+
### Compiling
43+
44+
* See [INSTALL.md](./INSTALL.md) for info on building and installing
45+
* TBD: Any info on tools, dependencies, and compiling options
46+
* e.g. individual SMT libraries can be omitted using `STP_STUB=1` or `YICES_STUB=1`
47+
48+
### Testing
49+
50+
* See the test suite's own [README file](./testsuite/README.md)
51+
52+
### BSC stage: Parsing
53+
54+
* [Keyword parsing in BH/Classic](https://github.com/B-Lang-org/language-bh/issues/5#issuecomment-1856814271)
55+
56+
### BSC stage: Type checking
57+
58+
* See the link on the use of SMT solvers, below
59+
60+
### BSC stage: Elaboration
61+
62+
* [How to add a new evaluator primitive to BSC](https://groups.io/g/b-lang-discuss/message/526)
63+
* specifically how to add a function to get the current module name
64+
* See the link on the use of SMT solvers, below
65+
66+
### BSC stage: Scheduling
67+
68+
* [Understanding scheduling](https://github.com/B-Lang-org/bsc/discussions/622#discussioncomment-7203579)
69+
* See the link on the use of SMT solvers, below
70+
71+
### BSC backends / naming
72+
73+
* [Naming conventions in the generated Verilog](https://groups.io/g/b-lang-discuss/topic/106903347)
74+
* [Verilog/Bluesim "main" and the naming of clock and reset ports](https://groups.io/g/b-lang-discuss/message/606)
75+
76+
### BSC backend: Verilog
77+
78+
* [BSC's deduction of portprops](https://groups.io/g/b-lang-discuss/topic/106516831)
79+
* [How to use the different Verilog directories (for different synth tools)](https://groups.io/g/b-lang-discuss/topic/106402322)
80+
81+
### BSC backend: Bluesim
82+
83+
* See the link on Bluesim stages, above, under Basics
84+
* [How Bluesim works (mostly the VCD dumping)](https://github.com/B-Lang-org/bsc/issues/519#issuecomment-1873853532)
85+
* [How Bluesim provides implementations for import-BVI](https://groups.io/g/b-lang-discuss/topic/106520424)
86+
* [How the Bluesim C API is imported into Bluetcl](https://groups.io/g/b-lang-discuss/message/554)
87+
* There is a template for making Bluesim standalone programs (without Tcl) in `bsc/util/bsim_standalone/`
88+
89+
### Bluetcl
90+
91+
* [Support for reflection in BSC](https://groups.io/g/b-lang-discuss/message/513)
92+
* specifically, Bluetcl (outside the language) and Generics (inside the language)
93+
* See the link on how Bluesim's C API is imported into Bluetcl, above, under Bluesim
94+
95+
### SMT solvers
96+
97+
* [The ways that SMT solvers are used in BSC](https://groups.io/g/b-lang-discuss/message/370)
98+
* [SAT solver usage and dumping](https://github.com/B-Lang-org/bsc/discussions/693#discussioncomment-9148985)
99+
* TBD: Status of the SMT solver source codes and how they are incorporated into BSC
100+
101+
### Clock and Reset methodology
102+
103+
* [Clock/reset inference](https://github.com/B-Lang-org/bsc/discussions/661)
104+
* BSC implements certain design decisions for clocks and resets --
105+
for example, the choice to implement reset inside of state elements (to ignore the `EN` input)
106+
instead of outside (as part of the `RDY` logic) --
107+
and there may be some documentation (perhaps internal to BS Inc) on those decisions
108+
* There was a paper at MEMOCODE 2006,
109+
["Reliable Design with Multiple Clock Domains"](https://www.researchgate.net/publication/224648422_Reliable_design_with_multiple_clock_domains)
110+
* An earlier version of this paper was submitted to DCC'06 (Designing Correct Circuits)
111+
* There is a BS Inc document from 16 Dec 2004 (`mcd.pdf`) that discusses some options, but only clocks, not yet reset
112+
* There is a BS Inc document from 28 Oct 2004 (`resets.txt`) that purports to be "a proposal on reset handling"
113+
but is very prelimary about the problem, not yet the solution
114+
* There is a BS Inc file `bsc-doc/doc/MCD-extensions.txt` that describes
115+
the new things in BSC to support MCD, both user visible attributes and
116+
the BSC source code changes
117+
* The BS Inc training slides include a
118+
[lecture on MCD](https://github.com/BSVLang/Main/blob/master/Tutorials/BSV_Training/Reference/Lec12_Multiple_Clock_Domains.pdf)
119+
120+
---

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,22 @@
22

33
# Bluespec Compiler
44

5-
[![Version]](https://github.com/B-Lang-org/bsc/releases/tag/2024.01) [![License]](./COPYING) [![Build Status]](https://github.com/b-lang-org/bsc/actions?query=workflow%3ACI+event%3Apush)
5+
[![Version]](https://github.com/B-Lang-org/bsc/releases/tag/2024.07)
6+
[![License]](./COPYING)
7+
[![Build Status]](https://github.com/b-lang-org/bsc/actions?query=workflow%3ACI+event%3Apush)
68

79
[License]: https://img.shields.io/badge/license-BSD%203-blueviolet.svg
8-
[Version]: https://img.shields.io/badge/release-2024.01-red.svg?logo=v
10+
[Version]: https://img.shields.io/badge/release-2024.07-red.svg?logo=v
911
[Build Status]: https://github.com/b-lang-org/bsc/workflows/CI/badge.svg?branch=main&event=push
1012

11-
**[Community] &bull; [Download] &bull; [Documentation] &bull; [Build] &bull; [Test]**
13+
**[Community] &bull; [Download] &bull; [Documentation] &bull; [Build] &bull; [Test] &bull; [Develop]**
1214

1315
[Community]: #community
1416
[Download]: #download
1517
[Documentation]: #documentation
1618
[Build]: ./INSTALL.md
1719
[TEST]: ./testsuite/README.md
20+
[Develop]: ./DEVELOP.md
1821

1922
---
2023

doc/BH_ref_guide/BH_lang.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3055,7 +3055,7 @@ \subsection{{\veri} modules}
30553055
share a port and it will insert a multiplexer accordingly.
30563056

30573057
Following a port name there can be port a property,
3058-
whic is one of the following:
3058+
which is one of the following:
30593059
\begindescrlist{xxxxxxx}
30603060
\litem{\te{reg}}
30613061
specifies that the port is directly connected

doc/libraries_ref_guide/LibDoc/Prelude.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ \subsubsection{BitExtend}
13001300
\cline{2-2}
13011301
&\begin{libverbatim}
13021302
function x#(m) truncate (x#(n) d)
1303-
provisos (Add#(k, n, m));
1303+
provisos (Add#(k, m, n));
13041304
\end{libverbatim}
13051305
\\
13061306
\hline

release/ReleaseNotes.adoc

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,97 @@ Bluespec Compiler (BSC) Release Notes
44
:last-update-label!:
55
:nofooter:
66

7+
2024.07 Release
8+
---------------
9+
10+
Changes since release 2024.01:
11+
12+
Documentation
13+
~~~~~~~~~~~~~
14+
15+
* Fix the type of `continuousAssert` in the Libraries Reference Guide
16+
(GitHub PR#686)
17+
18+
* Minor typo fix in the BH Reference Guide (GitHub PR#708)
19+
20+
Compiler
21+
~~~~~~~~
22+
23+
* Update source code to compile with GHC 9.10.1 (GitHub PR#705)
24+
25+
Libraries
26+
~~~~~~~~~
27+
28+
* Add BuildList library, analogous to BuildVector (GitHub PR#723)
29+
30+
Bluetcl
31+
~~~~~~~
32+
33+
* Resolve a potential compilation warning by removing the use of
34+
K&R C syntax that is deprecated in newer C standards
35+
(GitHub PR#703)
36+
37+
Bluesim
38+
~~~~~~~
39+
40+
* Add braces to some if-statements in generated {cpp} modules to avoid
41+
dangling-else warnings (GitHub Issue#442, PR#691)
42+
43+
* Resolve a warning during compilation of the Bluesim kernel by fixing
44+
a call to `bk_clock_name` in code that is unused except by
45+
developers for debugging (GitHub Issue#698, PR#702)
46+
47+
* Resolve a compilation error with newer {cpp} compilers by updating the
48+
source code to not use a feature that is deprecated since the C++20
49+
standard (GitHub Issue#698, PR#701)
50+
51+
Utilities
52+
~~~~~~~~~
53+
54+
* Update BSV mode for `emacs` to work with newer versions
55+
(GitHub PR#697)
56+
57+
General
58+
~~~~~~~
59+
60+
* Clean up how the `tcllibs` flags are computed in `platform.sh`
61+
(GitHub PR#703)
62+
** This adds the version number to the flag for macOS
63+
(from `-ltcl` to `-ltcl8.5`)
64+
65+
Test Suite
66+
~~~~~~~~~~
67+
68+
* Add support for querying the `MACHTYPE` so that tests can support
69+
different behavior on, say, `arm64` vs `x86_64`
70+
(GitHub Issue#688, PR#690)
71+
72+
Internal
73+
~~~~~~~~
74+
75+
* Releases now built with GHC 9.6.6 (previously 9.4.8)
76+
(GitHub PR#705, PR#728)
77+
78+
* Updates to GitHub CI (continuous integration)
79+
** Retire the CI for macOS 11 (GitHub PR#700)
80+
** Add CI for macOS 14 (GitHub PR#690)
81+
** Add CI for Ubuntu 24.04 (beta) (GitHub PR#700)
82+
** Expand the number of GHC versions that are tested besides
83+
the version for releases -- previously only a single "latest"
84+
version was being tested (GitHub PR#705)
85+
*** Continue testing with older GHC 9.4.8,
86+
which GHCUP still labels as recommended
87+
*** Continue testing with GHC 9.8 (updated to the latest 9.8.2)
88+
*** Add testing with the new GHC 9.10.1
89+
** Support leaving the `hls_version` field blank to indicate that
90+
the HLS testing step should be skipped (PR#703)
91+
*** This allows for testing newer GHC installations
92+
that don't yet have HLS support in GHCUP
93+
** Ensure that `brew` and `apt-get` are updated before installing,
94+
to avoid failures due to old GitHub runner images (GitHub PR#687)
95+
96+
'''
97+
798
2024.01 Release
899
---------------
9100

0 commit comments

Comments
 (0)