rewire-backend-2.8: A Haskell-to-Verilog/VHDL compiler, the Hyle backend
Safe HaskellSafe
LanguageHaskell2010

ReWire.Verilog.Syntax

Synopsis

Documentation

newtype Device Source #

Constructors

Device 

Fields

Instances

Instances details
Show Device Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Eq Device Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

(==) :: Device -> Device -> Bool #

(/=) :: Device -> Device -> Bool #

Pretty Device Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

pretty :: Device -> Doc ann #

prettyList :: [Device] -> Doc ann

type Name = Text Source #

type Size = Word Source #

type Index = Int Source #

data Module Source #

Constructors

Module 

Fields

Instances

Instances details
Show Module Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Eq Module Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

(==) :: Module -> Module -> Bool #

(/=) :: Module -> Module -> Bool #

Pretty Module Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

pretty :: Module -> Doc ann #

prettyList :: [Module] -> Doc ann

sanitizeComment :: Text -> Text Source #

Newlines in comment text would push the remainder into code position.

data Port Source #

Constructors

Input Signal

can't be reg

InOut Signal

can't be reg

Output Signal 

Instances

Instances details
Show Port Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

showsPrec :: Int -> Port -> ShowS #

show :: Port -> String #

showList :: [Port] -> ShowS #

Eq Port Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

(==) :: Port -> Port -> Bool #

(/=) :: Port -> Port -> Bool #

Pretty Port Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

pretty :: Port -> Doc ann #

prettyList :: [Port] -> Doc ann

ppDims :: [Size] -> Doc an Source #

data Signal Source #

Constructors

Wire [Size] Name [Size] 
Logic [Size] Name [Size] 
Reg [Size] Name [Size] 

Instances

Instances details
Show Signal Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Eq Signal Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

(==) :: Signal -> Signal -> Bool #

(/=) :: Signal -> Signal -> Bool #

Pretty Signal Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

pretty :: Signal -> Doc ann #

prettyList :: [Signal] -> Doc ann

data Stmt Source #

Constructors

Always [Sensitivity] Stmt 
AlwaysComb Stmt 
Initial Stmt 
IfElse Exp Stmt Stmt 
If Exp Stmt 
Case Exp [(Exp, Stmt)] Stmt

Scrutinee, case items, default item.

Assign LVal Exp 
SeqAssign LVal Exp 
ParAssign LVal Exp 
WireAssign Size Name Exp

Net declaration assignment: wire [n-1:0] x = e;

Decl Signal

A signal declaration in statement position.

LocalParam Size Name BV 
Comment Text 
Block [Stmt] 
Instantiate Name Name [(Name, Exp)] [(Name, Exp)] 
Delay Natural

#n;

Display Text [Exp]

$display("fmt", args);

Finish

$finish;

Instances

Instances details
Show Stmt Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

showsPrec :: Int -> Stmt -> ShowS #

show :: Stmt -> String #

showList :: [Stmt] -> ShowS #

Eq Stmt Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

(==) :: Stmt -> Stmt -> Bool #

(/=) :: Stmt -> Stmt -> Bool #

Pretty Stmt Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

pretty :: Stmt -> Doc ann #

prettyList :: [Stmt] -> Doc ann

ppItem :: (Exp, Stmt) -> Doc an Source #

data Sensitivity Source #

Constructors

Pos Name 
Neg Name 

Instances

Instances details
Show Sensitivity Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Eq Sensitivity Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Pretty Sensitivity Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

pretty :: Sensitivity -> Doc ann #

prettyList :: [Sensitivity] -> Doc ann

data Exp Source #

Instances

Instances details
Show Exp Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

showsPrec :: Int -> Exp -> ShowS #

show :: Exp -> String #

showList :: [Exp] -> ShowS #

Eq Exp Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

(==) :: Exp -> Exp -> Bool #

(/=) :: Exp -> Exp -> Bool #

Pretty Exp Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

pretty :: Exp -> Doc ann #

prettyList :: [Exp] -> Doc ann

Parenless Exp Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

parenless :: Exp -> Bool Source #

class Parenless a where Source #

Methods

parenless :: a -> Bool Source #

Instances

Instances details
Parenless Exp Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

parenless :: Exp -> Bool Source #

mparens :: (Pretty a, Parenless a) => a -> Doc an Source #

ppBinOp :: Exp -> Text -> Exp -> Doc an Source #

ppUnOp :: Text -> Exp -> Doc an Source #

data Bit Source #

Constructors

Zero 
One 
X 
Z 

Instances

Instances details
Show Bit Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

showsPrec :: Int -> Bit -> ShowS #

show :: Bit -> String #

showList :: [Bit] -> ShowS #

Eq Bit Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

(==) :: Bit -> Bit -> Bool #

(/=) :: Bit -> Bit -> Bool #

Pretty Bit Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

pretty :: Bit -> Doc ann #

prettyList :: [Bit] -> Doc ann

data LVal Source #

Instances

Instances details
Show LVal Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

showsPrec :: Int -> LVal -> ShowS #

show :: LVal -> String #

showList :: [LVal] -> ShowS #

Eq LVal Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

(==) :: LVal -> LVal -> Bool #

(/=) :: LVal -> LVal -> Bool #

Pretty LVal Source # 
Instance details

Defined in ReWire.Verilog.Syntax

Methods

pretty :: LVal -> Doc ann #

prettyList :: [LVal] -> Doc ann

ppCommaList :: [Doc an] -> Doc an Source #

A comma-separated list; long lists (> 4 elements) may wrap at the page width (each separator is a softline, giving line-filling behavior).

cat :: [Exp] -> Exp Source #