Skip to content

Commit f4f8bf4

Browse files
Merge branch 'develop-examples-fpga-helloworld'. Close #657.
**Description** We need an example that demonstrates how to work with FPGAs using Copilot. This will help users start with `copilot-bluespec`, and also help validate our work. **Type** - Feature: New example. **Additional context** None. **Requester** - Ivan Perez. **Method to check presence of bug** **Expected result** The `copilot` package includes an example that shows how to use `copilot-bluespec`. **Solution implemented** Create README under `copilot/examples/fpga`, in a folder for the specific example. Add any necessary auxiliary files. **Further notes** None.
2 parents 2f8ae35 + 47f83a0 commit f4f8bf4

File tree

6 files changed

+688
-0
lines changed

6 files changed

+688
-0
lines changed

copilot/CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2025-08-21
2+
* Add hello world example for FPGA. (#657)
3+
14
2025-07-07
25
* Version bump (4.5). (#642)
36

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module Main where
2+
3+
import Language.Copilot
4+
import Copilot.Compile.Bluespec
5+
6+
-- Define switches input
7+
sw :: Stream Word8
8+
sw = extern "sw" Nothing
9+
10+
-- Define LEDS output
11+
leds :: Stream Word8
12+
leds = sw
13+
14+
spec = do
15+
trigger "leds" true [arg leds]
16+
17+
main = do
18+
spec' <- reify spec
19+
compile "HelloWorld" spec'

0 commit comments

Comments
 (0)