blob: 30e6f0e285032b218f8f4464faa11d8e8d3767c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Blinker where
import Clash.Prelude
import Clash.Annotations.SynthesisAttributes
-- Define a synthesis domain with a clock with a period of 20000 /ps/.
-- i.e. 50 MHz
-- createDomain vSystem{vName="Input", vPeriod=20000}
-- Define a synthesis domain with a clock with a period of 50000 /ps/.
-- i.e. 20 MHz
createDomain vSystem{vName="Dom20MHz", vPeriod=50000}
{-# ANN topEntity
(Synthesize
{ t_name = "Blinker"
, t_inputs = [ PortName "KEY0" ]
, t_output = PortName "LED"
}) #-}
topEntity ::
Signal Dom20MHz Bit
`Annotate` 'StringAttr "chip_pin" "AC9"
`Annotate` 'StringAttr
"altera_attribute" "-name IO_STANDARD \"3.3-V LVTTL\"" ->
Signal Dom20MHz Bit
`Annotate` 'StringAttr
"chip_pin" "F7"
`Annotate` 'StringAttr
"altera_attribute" "-name IO_STANDARD \"3.3-V LVTTL\""
topEntity sw = sw
|