Skip to content

Commit

Permalink
Merge branch 'main' into str-type-append
Browse files Browse the repository at this point in the history
  • Loading branch information
krame505 authored Jan 10, 2025
2 parents a6a5a3e + a67cac8 commit 1155d5f
Show file tree
Hide file tree
Showing 60 changed files with 880 additions and 1,551 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build-and-test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ jobs:
ghcup install hls ${{ inputs.hls_version }}
macos_ver=$(sw_vers -productVersion | cut -d '.' -f 1)
if [ "$macos_ver" -ge "14" ]; then
brew install pyyaml
python3 -m venv ./venv
source ./venv/bin/activate
python3 -m pip install pyyaml
else
pip3 install pyyaml
fi
Expand Down
28 changes: 16 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@ jobs:
uses: ./.github/workflows/build-and-test-ubuntu.yml
with:
os: ${{ matrix.os }}
ghc_version: 9.6.5
hls_version: 2.8.0.0
ghc_version: 9.6.6
hls_version: 2.9.0.1
secrets: inherit

build-and-test-macos:
strategy:
matrix:
os: [ macos-12, macos-13, macos-14 ]
os: [ macos-13, macos-14, macos-15 ]
fail-fast: false
name: "Build/Test: ${{ matrix.os }}"
uses: ./.github/workflows/build-and-test-macos.yml
with:
os: ${{ matrix.os }}
ghc_version: 9.6.5
hls_version: 2.8.0.0
ghc_version: 9.6.6
hls_version: 2.9.0.1
secrets: inherit

# ------------------------------
Expand All @@ -68,10 +68,12 @@ jobs:
matrix:
ghc:
- version: 9.4.8
hls: 2.7.0.0
- version: 9.8.2
hls: 2.7.0.0
hls: 2.9.0.1
- version: 9.8.4
hls:
- version: 9.10.1
hls: 2.9.0.1
- version: 9.12.1
hls:
name: "Build/Test: GHC Ubuntu"
uses: ./.github/workflows/build-and-test-ubuntu.yml
Expand All @@ -86,10 +88,12 @@ jobs:
matrix:
ghc:
- version: 9.4.8
hls: 2.7.0.0
- version: 9.8.2
hls: 2.7.0.0
hls: 2.9.0.1
- version: 9.8.4
hls:
- version: 9.10.1
hls: 2.9.0.1
- version: 9.12.1
hls:
name: "Build/Test: GHC macOS"
uses: ./.github/workflows/build-and-test-macos.yml
Expand Down Expand Up @@ -143,7 +147,7 @@ jobs:
build-doc-macOS:
strategy:
matrix:
os: [ macos-12, macos-13, macos-14 ]
os: [ macos-13, macos-14, macos-15 ]
fail-fast: false
name: "Build doc: ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/install_dependencies_doc_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,14 @@

brew update

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

brew install texlive
120 changes: 120 additions & 0 deletions DEVELOP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<div class="title-block" style="text-align: center;" align="center">

# Bluespec Compiler - Information for developers

---

</div>

Here you can find documentation on the internal architecture of [BSC](./README.md)
and other helpful information for people who want to contribute to the source code.

Feel free to ask questions on GitHub (in an Issue or a Discussion)
or on the [`bsc-dev`](https://groups.io/g/bsc-dev) mailing list.
The `bsc-dev` list is for questions that are only relevant to developers,
to keep traffic on the [`b-lang-discuss`](https://groups.io/g/b-lang-discuss)
mailing list light for people who are just users.

---

At the moment there is no formal documentation.
However, there are written responses to questions on GitHub and the mailing lists,
that can someday be collected and turned into a document.
The following is a running list of those writings.

### Basics / General info

* [BSC is a series of stages](https://groups.io/g/bsc-dev/message/14)
* This write-up includes a link to the following (incomplete)
[diagrams of the BSC stages](https://docs.google.com/document/d/1130fyOsPtS6gMppB6BaO-qVXxzO5b_ha7sXwLdd8Dtg/edit?usp=sharing)
* See also [this brief breakdown of BSC](https://groups.io/g/b-lang-discuss/message/358)
by its three internal representations (CSyntax, ISyntax, ASyntax)
* Briefly on [printing and dumping from BSC and intermediate files](https://groups.io/g/b-lang-discuss/message/356)
* [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)
* [The meaning of `.bo` and `.ba` files and compiler flow](https://github.com/B-Lang-org/bsc/discussions/575#discussioncomment-6458212)
* Hidden flags
* BSC has a flag `-help-hidden` for developers,
which shows more information than the `-help` for users
* Like the LaTeX documentation for flags in the BSC User Guide,
there is short LaTeX document for hidden flags at BS Inc (called `internal-user-guide`),
which could become part of a BSC Developer Guide

### Compiling

* See [INSTALL.md](./INSTALL.md) for info on building and installing
* TBD: Any info on tools, dependencies, and compiling options
* e.g. individual SMT libraries can be omitted using `STP_STUB=1` or `YICES_STUB=1`

### Testing

* See the test suite's own [README file](./testsuite/README.md)

### BSC stage: Parsing

* [Keyword parsing in BH/Classic](https://github.com/B-Lang-org/language-bh/issues/5#issuecomment-1856814271)

### BSC stage: Type checking

* See the link on the use of SMT solvers, below

### BSC stage: Elaboration

* [How to add a new evaluator primitive to BSC](https://groups.io/g/b-lang-discuss/message/526)
* specifically how to add a function to get the current module name
* See the link on the use of SMT solvers, below

### BSC stage: Scheduling

* [Understanding scheduling](https://github.com/B-Lang-org/bsc/discussions/622#discussioncomment-7203579)
* See the link on the use of SMT solvers, below

### BSC backends / naming

* [Naming conventions in the generated Verilog](https://groups.io/g/b-lang-discuss/topic/106903347)
* [Verilog/Bluesim "main" and the naming of clock and reset ports](https://groups.io/g/b-lang-discuss/message/606)

### BSC backend: Verilog

* [BSC's deduction of portprops](https://groups.io/g/b-lang-discuss/topic/106516831)
* [How to use the different Verilog directories (for different synth tools)](https://groups.io/g/b-lang-discuss/topic/106402322)

### BSC backend: Bluesim

* See the link on Bluesim stages, above, under Basics
* [How Bluesim works (mostly the VCD dumping)](https://github.com/B-Lang-org/bsc/issues/519#issuecomment-1873853532)
* [How Bluesim provides implementations for import-BVI](https://groups.io/g/b-lang-discuss/topic/106520424)
* [How the Bluesim C API is imported into Bluetcl](https://groups.io/g/b-lang-discuss/message/554)
* There is a template for making Bluesim standalone programs (without Tcl) in `bsc/util/bsim_standalone/`

### Bluetcl

* [Support for reflection in BSC](https://groups.io/g/b-lang-discuss/message/513)
* specifically, Bluetcl (outside the language) and Generics (inside the language)
* See the link on how Bluesim's C API is imported into Bluetcl, above, under Bluesim

### SMT solvers

* [The ways that SMT solvers are used in BSC](https://groups.io/g/b-lang-discuss/message/370)
* [SAT solver usage and dumping](https://github.com/B-Lang-org/bsc/discussions/693#discussioncomment-9148985)
* TBD: Status of the SMT solver source codes and how they are incorporated into BSC

### Clock and Reset methodology

* [Clock/reset inference](https://github.com/B-Lang-org/bsc/discussions/661)
* BSC implements certain design decisions for clocks and resets --
for example, the choice to implement reset inside of state elements (to ignore the `EN` input)
instead of outside (as part of the `RDY` logic) --
and there may be some documentation (perhaps internal to BS Inc) on those decisions
* There was a paper at MEMOCODE 2006,
["Reliable Design with Multiple Clock Domains"](https://www.researchgate.net/publication/224648422_Reliable_design_with_multiple_clock_domains)
* An earlier version of this paper was submitted to DCC'06 (Designing Correct Circuits)
* There is a BS Inc document from 16 Dec 2004 (`mcd.pdf`) that discusses some options, but only clocks, not yet reset
* There is a BS Inc document from 28 Oct 2004 (`resets.txt`) that purports to be "a proposal on reset handling"
but is very prelimary about the problem, not yet the solution
* There is a BS Inc file `bsc-doc/doc/MCD-extensions.txt` that describes
the new things in BSC to support MCD, both user visible attributes and
the BSC source code changes
* The BS Inc training slides include a
[lecture on MCD](https://github.com/BSVLang/Main/blob/master/Tutorials/BSV_Training/Reference/Lec12_Multiple_Clock_Domains.pdf)

---
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@

# Bluespec Compiler

[![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)
[![Version]](https://github.com/B-Lang-org/bsc/releases/tag/2024.07)
[![License]](./COPYING)
[![Build Status]](https://github.com/b-lang-org/bsc/actions?query=workflow%3ACI+event%3Apush)

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

**[Community] &bull; [Download] &bull; [Documentation] &bull; [Build] &bull; [Test]**
**[Community] &bull; [Download] &bull; [Documentation] &bull; [Build] &bull; [Test] &bull; [Develop]**

[Community]: #community
[Download]: #download
[Documentation]: #documentation
[Build]: ./INSTALL.md
[TEST]: ./testsuite/README.md
[Develop]: ./DEVELOP.md

---

Expand Down
2 changes: 1 addition & 1 deletion doc/BH_ref_guide/BH_lang.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3055,7 +3055,7 @@ \subsection{{\veri} modules}
share a port and it will insert a multiplexer accordingly.

Following a port name there can be port a property,
whic is one of the following:
which is one of the following:
\begindescrlist{xxxxxxx}
\litem{\te{reg}}
specifies that the port is directly connected
Expand Down
2 changes: 1 addition & 1 deletion doc/libraries_ref_guide/LibDoc/Prelude.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ \subsubsection{BitExtend}
\cline{2-2}
&\begin{libverbatim}
function x#(m) truncate (x#(n) d)
provisos (Add#(k, n, m));
provisos (Add#(k, m, n));
\end{libverbatim}
\\
\hline
Expand Down
91 changes: 91 additions & 0 deletions release/ReleaseNotes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,97 @@ Bluespec Compiler (BSC) Release Notes
:last-update-label!:
:nofooter:

2024.07 Release
---------------

Changes since release 2024.01:

Documentation
~~~~~~~~~~~~~

* Fix the type of `continuousAssert` in the Libraries Reference Guide
(GitHub PR#686)
* Minor typo fix in the BH Reference Guide (GitHub PR#708)
Compiler
~~~~~~~~

* Update source code to compile with GHC 9.10.1 (GitHub PR#705)
Libraries
~~~~~~~~~

* Add BuildList library, analogous to BuildVector (GitHub PR#723)
Bluetcl
~~~~~~~

* Resolve a potential compilation warning by removing the use of
K&R C syntax that is deprecated in newer C standards
(GitHub PR#703)
Bluesim
~~~~~~~

* Add braces to some if-statements in generated {cpp} modules to avoid
dangling-else warnings (GitHub Issue#442, PR#691)
* Resolve a warning during compilation of the Bluesim kernel by fixing
a call to `bk_clock_name` in code that is unused except by
developers for debugging (GitHub Issue#698, PR#702)
* Resolve a compilation error with newer {cpp} compilers by updating the
source code to not use a feature that is deprecated since the C++20
standard (GitHub Issue#698, PR#701)
Utilities
~~~~~~~~~

* Update BSV mode for `emacs` to work with newer versions
(GitHub PR#697)
General
~~~~~~~

* Clean up how the `tcllibs` flags are computed in `platform.sh`
(GitHub PR#703)
** This adds the version number to the flag for macOS
(from `-ltcl` to `-ltcl8.5`)
Test Suite
~~~~~~~~~~

* Add support for querying the `MACHTYPE` so that tests can support
different behavior on, say, `arm64` vs `x86_64`
(GitHub Issue#688, PR#690)
Internal
~~~~~~~~

* Releases now built with GHC 9.6.6 (previously 9.4.8)
(GitHub PR#705, PR#728)
* Updates to GitHub CI (continuous integration)
** Retire the CI for macOS 11 (GitHub PR#700)
** Add CI for macOS 14 (GitHub PR#690)
** Add CI for Ubuntu 24.04 (beta) (GitHub PR#700)
** Expand the number of GHC versions that are tested besides
the version for releases -- previously only a single "latest"
version was being tested (GitHub PR#705)
*** Continue testing with older GHC 9.4.8,
which GHCUP still labels as recommended
*** Continue testing with GHC 9.8 (updated to the latest 9.8.2)
*** Add testing with the new GHC 9.10.1
** Support leaving the `hls_version` field blank to indicate that
the HLS testing step should be skipped (PR#703)
*** This allows for testing newer GHC installations
that don't yet have HLS support in GHCUP
** Ensure that `brew` and `apt-get` are updated before installing,
to avoid failures due to old GitHub runner images (GitHub PR#687)
'''

2024.01 Release
---------------

Expand Down
Loading

0 comments on commit 1155d5f

Please sign in to comment.