Skip to content

Commit d7b1859

Browse files
committed
Merge remote-tracking branch 'upstream/main' into genwrap
2 parents df0f863 + b4f31db commit d7b1859

File tree

12 files changed

+245
-11
lines changed

12 files changed

+245
-11
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ 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:
@@ -55,8 +55,8 @@ jobs:
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
# ------------------------------

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

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package BuildList where
2+
3+
import List
4+
5+
-- A typeclass used to implement a vector construction function which can take
6+
-- any number of arguments (>0).
7+
-- The type parameter `a` is the type of the elements in the list.
8+
-- The type parameter `r` is the return type of the function, which can be a
9+
-- list (base case) or a function (recursive case) that takes another element
10+
-- and returns a new function.
11+
-- The list here is built in reverse for efficiency, and then reversed.
12+
class BuildList a r | r -> a where
13+
lst' :: List a -> a -> r
14+
15+
instance BuildList a (List a) where
16+
lst' l x = reverse $ x :> l
17+
18+
instance (BuildList a r) => BuildList a (a -> r) where
19+
lst' l x y = lst' (x :> l) y
20+
21+
-- Example usage:
22+
-- lst 1 2 3 4 5 => 1 :> 2 :> 3 :> 4 :> 5 :> nil
23+
-- lst False => False :> nil
24+
lst :: (BuildList a r) => a -> r
25+
lst x = lst' nil x

src/Libraries/Base3-Misc/Misc.bsv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package Misc;
33
import Arbiter::*;
44
import BRAM::*;
55
import BRAMFIFO::*;
6+
import BuildList::*;
67
import BuildVector::*;
78
import BUtils::*;
89
import BypassReg::*;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
# Test functionality
3+
test_veri_only TestBuildList
4+
5+
# Test type check error messages
6+
compile_fail TestBuildListFail.bs
7+
compare_file TestBuildListFail.bs.bsc-out
8+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# for "make clean" to work everywhere
2+
3+
CONFDIR = $(realpath ../..)
4+
5+
include $(CONFDIR)/clean.mk
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package TestBuildList where
2+
3+
import List
4+
import BuildList
5+
6+
{-# properties sysTestBuildList = { synthesize } #-}
7+
8+
sysTestBuildList :: Module Empty
9+
sysTestBuildList =
10+
module
11+
let
12+
v1 :: List Bool
13+
v1 = lst True False True True
14+
15+
v2 :: List (UInt 8);
16+
v2 = lst 7 32
17+
18+
v3 :: List Bool
19+
v3 = lst False True True
20+
21+
v4 :: List (UInt 4)
22+
v4 = lst 3
23+
24+
done :: Reg Bool <- mkReg False
25+
26+
rules
27+
"r": when not done
28+
==> action
29+
$display "v1[0] -> %b" (v1!!0)
30+
$display "v1[1] -> %b" (v1!!1)
31+
$display "v1[2] -> %b" (v1!!2)
32+
$display "v1[3] -> %b" (v1!!3)
33+
$display "v2[0] -> %d" (v2!!0)
34+
$display "v2[1] -> %d" (v2!!1)
35+
$display "v3[0] -> %b" (v3!!0)
36+
$display "v3[1] -> %b" (v3!!1)
37+
$display "v3[2] -> %b" (v3!!2)
38+
$display "v4[0] -> %d" (v4!!0)
39+
done := True
40+
41+
"r2": when done
42+
==> $finish 0
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package TestBuildListFail where
2+
3+
import List
4+
import BuildList
5+
6+
-- Test error messages
7+
8+
-- Wrong element type, Literal
9+
fn1 :: Bool
10+
fn1 =
11+
let v :: List Bool
12+
v = lst 0 1 2
13+
in v == v
14+
15+
-- Wrong element type, concrete
16+
fn2 :: Bool
17+
fn2 =
18+
let v :: List Integer
19+
v = lst True False True
20+
in v == v
21+
22+
-- Wrong return type
23+
fn3 :: Bool
24+
fn3 =
25+
let v :: Bit 3
26+
v = lst True False True
27+
in v == v
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
checking package dependencies
2+
compiling TestBuildListFail.bs
3+
Error: "TestBuildListFail.bs", line 12, column 13: (T0031)
4+
The contexts for this expression could not be resolved because there are no
5+
instances of the form:
6+
Prelude.Literal Prelude.Bool
7+
The context was implied by expressions at the following positions:
8+
"TestBuildListFail.bs", line 12, column 17
9+
Error: "TestBuildListFail.bs", line 18, column 8: (T0032)
10+
This expression requires the following context which could not be resolved:
11+
BuildList.BuildList Prelude.Bool (Prelude.Bool -> Prelude.Bool -> Prelude.List Prelude.Integer)
12+
The context was implied by expressions at the following positions:
13+
"TestBuildListFail.bs", line 19, column 13
14+
An instance for this context exists, but it depends on the following context
15+
for which there is no instance:
16+
BuildList.BuildList Prelude.Bool (Prelude.List Prelude.Integer)
17+
Error: "TestBuildListFail.bs", line 25, column 8: (T0032)
18+
This expression requires the following context which could not be resolved:
19+
BuildList.BuildList Prelude.Bool (Prelude.Bool -> Prelude.Bool -> Prelude.Bit 3)
20+
The context was implied by expressions at the following positions:
21+
"TestBuildListFail.bs", line 26, column 13
22+
An instance for this context exists, but it depends on the following context
23+
for which there is no instance:
24+
BuildList.BuildList Prelude.Bool (Prelude.Bit 3)

0 commit comments

Comments
 (0)