Types and Type Families for Hardware Simulation and Synthesis
- 384 Downloads
In this paper, we overview the design and implementation of our latest version of Kansas Lava. Driven by needs and experiences of implementing telemetry circuits, we have made a number of recent improvements to both the external API and the internal representations used. We have retained our dual shallow/deep representation of signals in general, but now have a number of externally visible abstractions for combinatorial, sequential, and enabled signals. We introduce these abstractions, as well as our new abstractions for memory and memory updates. Internally, we found the need to represent unknown values inside our circuits, so we made aggressive use of type families to lift our values in a principled and regular way. We discuss this design decision, how it unfortunately complicates the internals of Kansas Lava, and how we mitigate this complexity.
KeywordsType Family Sequential Circuit Combinatorial Circuit Abstract Syntax Tree Clock Domain
Unable to display preview. Download preview PDF.
- 1.Berry, G.: The constructive semantics of pure Esterel (1999), http://www-sop.inria.fr/esterel.org/files/
- 2.Bjesse, P., Claessen, K., Sheeran, M., Singh, S.: Lava: Hardware design in haskell. In: International Conference on Functional Programming, pp. 174–184 (1998)Google Scholar
- 4.Claessen, K.: Embedded Languages for Describing and Verifying Hardware. PhD thesis, Dept. of Computer Science and Engineering, Chalmers University of Technology (April 2001)Google Scholar
- 5.Gill, A.: Type-safe observable sharing in Haskell. In: Proceedings of the 2009 ACM SIGPLAN Haskell Symposium (September 2009)Google Scholar
- 8.Jones, S.P., Shields, M.: Lexically scoped type variables, http://research.microsoft.com/en-us/um/people/simonpj/papers/scoped-tyvars/
- 9.Leijen, D., Meijer, E.: Domain specific embedded compilers. In: 2nd USENIX Conference on Domain Specific Languages (DSL 1999), Austin, Texas, pp. 109–122 (October 1999)Google Scholar
- 11.McBride, C., Patterson, R.: Applicative programing with effects. Journal of Functional Programming 16(6) (2006)Google Scholar
- 12.Sander, I.: System Modeling and Design Refinement in ForSyDe. PhD thesis, Royal Institute of Technology, Stockholm, Sweden (April 2003)Google Scholar