Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions inline-verilog/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Very quick and dirty "inline Verilog" support for Haskell. See `tests.hs` for examples.

Currently missing or untested:

* Inputs/outputs wider than 64 bits.
* `struct` ports.
* Multidimensional input/output port, e.g. `reg [15:0] foo [3:0][3:0]` .
* Importing.

All of the above should be easy, I just didn't bother yet.
2 changes: 2 additions & 0 deletions inline-verilog/Setup.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Distribution.Simple
main = defaultMain
55 changes: 55 additions & 0 deletions inline-verilog/inline-verilog.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
cabal-version: 2.2
name: inline-verilog
version: 0.1.0.0
synopsis: Lets you embed Verilog code into Haskell.
description: Utilities to inline Verilog code into Haskell using inline-c. See
tests for example on how to build.
license: MIT
license-file: LICENSE
author: Francesco Mazzoli
maintainer: f@mazzo.li
copyright: (c) 2025 Francesco Mazzoli
category: FFI
tested-with: GHC == 9.2.8, GHC == 9.4.7, GHC == 9.6.2
build-type: Simple

source-repository head
type: git
location: https://github.com/fpco/inline-c

library
exposed-modules: Language.Verilog.Inline
build-depends: base >=4.7 && <5
, bytestring
, inline-c >= 0.9.0.0
, inline-c-cpp
, template-haskell
, text
, process
, temporary
, raw-strings-qq
, parsec
, parsers
, unordered-containers
, aeson
, bytestring
, transformers
hs-source-dirs: src
default-language: Haskell2010
ghc-options: -Wall

test-suite tests
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: tests.hs
build-depends: base >=4 && <5
, bytestring
, inline-c
, inline-verilog
, hspec
, containers
, template-haskell
, vector
, raw-strings-qq
, QuickCheck
default-language: Haskell2010
Loading
Loading