随笔分类 - Scala
摘要:https://mp.weixin.qq.com/s/80Q8j-OSMtgh5a92pI-MZA 使用value和mask来描述一个比特模式,即:value = bits & mask. 参考链接: https://github.com/freechipsproject/chisel3/blob/
阅读全文
摘要:https://mp.weixin.qq.com/s/5oAwH3scumARzPidRBfG2w 带锁多入单出仲裁器,输出会被锁定指定的时钟周期。 参考链接: https://github.com/freechipsproject/chisel3/blob/master/src/main/scal
阅读全文
摘要:https://mp.weixin.qq.com/s/GcNIFkHfa0gW0HKkKvHZEQ 循环优先级(Round Robin)仲裁器。 参考链接: https://github.com/freechipsproject/chisel3/blob/master/src/main/scala/
阅读全文
摘要:https://mp.weixin.qq.com/s/7Y23gV6yPvtmvKHTo2I8mw 基于ReadyValid接口实现的多入单出仲裁器。 参考链接: https://github.com/freechipsproject/chisel3/blob/master/src/main/sca
阅读全文
摘要:https://mp.weixin.qq.com/s/vlyOIsQxR6bCqDDMtRQLLg 实现队列模块,先入先出(FIFO)。 参考链接: https://github.com/freechipsproject/chisel3/blob/master/src/main/scala/chis
阅读全文
摘要:https://mp.weixin.qq.com/s/g7Q9ChxHbAQGkbMmOymh-g ReadyValid通信接口。通信的双方为数据的生产者(Producer)和消费者(Consumer)。 通信协议: 1. Producer有数据要发送,则把Valid位置位为1; 2. Consum
阅读全文
摘要:https://mp.weixin.qq.com/s/WeFesE8k0ORxlaNfLvDzgg 流水线,用于添加延迟。 参考链接: https://github.com/freechipsproject/chisel3/blob/master/src/main/scala/chisel3/uti
阅读全文
摘要:https://mp.weixin.qq.com/s/L5eAwv--WzZdr-CfW2-XNA Chisel提供的Valid接口。如果valid为置1,则表明输出的bits有效;反之,则输出无效。 参考链接: https://github.com/freechipsproject/chisel3
阅读全文
摘要:https://mp.weixin.qq.com/s/tDpUe9yhwC-2c1VqisFzMw 演示如何使用状态机。 参考链接: https://github.com/ucb-bar/chisel-tutorial/blob/release/src/main/scala/solutions/Ve
阅读全文
摘要:https://mp.weixin.qq.com/s/5lcMkenM2zTy-pYOXfRjyA 演示如何使用switch/is来实现状态机。 参考链接: https://github.com/ucb-bar/chisel-tutorial/blob/release/src/main/scala/
阅读全文
摘要:https://mp.weixin.qq.com/s/e8vJ8claauBtiuedxYYaJw 实现可以动态索引的表。 参考链接: https://github.com/ucb-bar/chisel-tutorial/blob/release/src/main/scala/examples/Tb
阅读全文
摘要:https://mp.weixin.qq.com/s/-AVJD1IfvNIJhmZM40DemA 实现后入先出(last in, first out)的栈。 参考链接: https://github.com/ucb-bar/chisel-tutorial/blob/release/src/main
阅读全文
摘要:https://mp.weixin.qq.com/s/3hDzpJiANdwp07hO03psyA 演示使用函数进行代码复用的方法。 参考链接: https://github.com/ucb-bar/chisel-tutorial/blob/release/src/main/scala/exampl
阅读全文
摘要:https://mp.weixin.qq.com/s/OtiQnE52PwdCpvmzJ6VFnA 奇偶发生器。统计输入中1的个数,如果为偶数则输出0,奇数则输出1。 参考链接: https://github.com/ucb-bar/chisel-tutorial/blob/release/src/
阅读全文
摘要:https://mp.weixin.qq.com/s/RQg2ca1rwfVHx_QG-IOV-w 字节选择器。 参考链接: https://github.com/ucb-bar/chisel-tutorial/blob/release/src/main/scala/examples/ByteSel
阅读全文
摘要:https://mp.weixin.qq.com/s/LKiXUgSnt3DzgFLa9zLCmQ 简单的寄存器在时钟的驱动下,逐个往下传值。 参考链接: https://github.com/ucb-bar/chisel-tutorial/blob/release/src/main/scala/e
阅读全文
摘要:https://mp.weixin.qq.com/s/SEcVjGRL1YloGlEPSoHr3A 位数为参数的加法器。通过FullAdder级联实现。 参考链接: https://github.com/ucb-bar/chisel-tutorial/blob/release/src/main/sc
阅读全文
摘要:https://mp.weixin.qq.com/s/X5EStKor2DU0-vS_wIO-fg 四位加法器。通过FullAdder级联实现。 参考链接: https://github.com/ucb-bar/chisel-tutorial/blob/release/src/main/scala/
阅读全文
摘要:https://mp.weixin.qq.com/s/Aye-SrUUuIP6_o67Rlt5OQ 全加器 逻辑图如下: 参考链接: https://github.com/ucb-bar/chisel-tutorial/blob/release/src/main/scala/examples/
阅读全文
摘要:https://mp.weixin.qq.com/s/2vjM-gcauvHnn6KJzlOm4g Chisel的模块和Verilog的模块很相似,都用来定义模块结构(hierarchical structure)。 Chisel的模块定义,包含三部分内容: a. 继承自Module类; b. 定义
阅读全文

浙公网安备 33010602011771号