Questions tagged [clash]

CλaSH (pronounced ‘clash’) is a functional hardware description language that borrows both its syntax and semantics from the functional programming language Haskell.

From the CλaSH home page:

CλaSH (pronounced ‘clash’) is a functional hardware description language that borrows both its syntax and semantics from the functional programming language Haskell. It provides a familiar structural design approach to both combinational and synchronous sequential circuits. The CλaSH compiler transforms these high-level descriptions to low-level synthesizable VHDL, Verilog, or SystemVerilog.

20 questions
1
vote
1 answer

Inferred conversion to applicative

I am using the hardware description tool Clash. Though this is a hardware description tool, my question is purely about Haskell. There is a datatype of the form data Signal dom a = ... This datatype has an Applicative instance as follows: instance…
1
vote
0 answers

Implement a simple bloomfilter by using clash

I have implemented a simple hash process in a bloom filter. How can I implement the same process by using clash? Here is the Haskell code I have already implemented: module testbloom where data HashTable = HashTable { location :: Int, value ::…
Antony
  • 11
  • 3
1
vote
0 answers

How to make DE0-nano use ttl-232R-3V3 cable communication with PC by 1 bit(with clash-lang)?

I am trying to use the Altera DE0-nano to communication with the PC. I am using the ttl-232R-3v3 cable, currently it transmit 8 bits data once, but with the cable, it can be 1 bit a time transmit. How do I do it? I have finish the 8 bit code: type…
Cormack
  • 17
  • 4
1
vote
0 answers

How to implement Clash readNew metastability workaround?

How do I correctly use readNew? A minimal example with two modules which just reads and writes an asyncRam: TopLevel.hs module TopLevel where import Clash.Prelude import LowerLevel topEntity :: Clock System Source -> Reset System…
dopamane
  • 1,315
  • 2
  • 14
  • 27
0
votes
1 answer

How to refactor code using the State monad in order to increase modularity by adding more functions?

I am trying to get the hang of monads. I figured it would be good practice to play with the state monad. Using the UART Rx from CLaSH: -- UART RX Logic data RxReg = RxReg { _rx_reg :: BitVector 8 , _rx_data :: BitVector 8 ,…
error_null_pointer
  • 457
  • 1
  • 6
  • 21
1
2