blarney-0.1.0.0
Copyright(c) Matthew Naylor 2020
(c) Alexandre Joannou 2020-2021
LicenseMIT
Maintainermattfn@gmail.com
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageGHC2021

Blarney.Backend

Description

 
Synopsis

Verilog backend

writeVerilog :: Modular a => String -> a -> IO () Source #

Shorthand for writeVerilogModule, with output directory set to current directory.

writeVerilogModule Source #

Arguments

:: Modular a 
=> a

Blarney function

-> String

Module name

-> String

Output directory

-> IO () 

This function generates Verilog for the mod Blarney 'Modular a' function. The name of the generated Verilog module is specified with modName and the generated Verilog file is `dirName/modName.v`.

writeVerilogTop Source #

Arguments

:: Module ()

Blarney function

-> String

Module name

-> String

Output directory

-> IO () 

This function is similar to writeVerilogModule but also generates a verilator wrapper and Makefile. This is useful for simple examples. Major projects will probably require a more customised verilator wrapper; in that case, just use writeVerilogModule, even for the top-level module, and write a custom verilator driver, perhaps using the Blarney-generated one as a starting point.

SMT backend

writeSMTScript Source #

Arguments

:: Modular a 
=> VerifyConf

Verification configuration setup

-> a

Blarney circuit

-> String

Script name

-> String

Output directory

-> IO () 

This function generates an SMT script to verify each assertion present in circuit, introduced by calls to the assert function. The name of the generated SMT script is specified with scriptName and the generated file is `dirName/scriptName.smt2`.

verifyWith Source #

Arguments

:: Modular a 
=> VerifyConf

Verification configuration setup

-> a

Blarney circuit

-> IO () 

This function interacts with an SMT solver to verify each assertion present in circuit, introduced by calls to the assert function.

verifyToDepth :: Modular a => Int -> a -> IO () Source #

New, improved SMT backend

Simulation backend

simulate :: Module () -> IO () Source #

Simulate the provided module

simulateCapture :: Module () -> IO String Source #

Simulate the provided module, capturing the displayed output

view :: FShow a => a -> IO () Source #

Display the value of the given expression for 1 cycle

viewFor :: FShow a => Int -> a -> IO () Source #

Display the value of the given expression for n cycles