https://mp.weixin.qq.com/s/36jreQGpDLCCNfmUwI34lA

 
模块接口有三种方向:Input/Output/Inout。Chisel在声明模块接口的时候,也需要提供这些信息。
 
参考链接:
 
 
1. SpeicifiedDirection
 
声明模块接口方向时,使用的方向类型:
其中:
a. 带下划线的为对象;
 
2. ActualDirection
 
使用方法目前不明。
其中:
a. 带下划线的为对象;
b. 不带箭头的联系为关联关系;
 
3. Input
 
定义了apply方法的Object,用法如函数调用。这三个函数调用,会为传入参数(Data子类型)的方向性赋值:
 
使用方法如:
val io = IO(new Bundle {
val in = Input(UInt(1.W))
val out = Output(UInt(1.W))
})
 
再如:
val io = IO(new Bundle {
val isWr = Input(Bool())
val wrAddr = Input(UInt(8.W))
val wrData = Input(UInt(32.W))
val boot = Input(Bool())
val valid = Output(Bool())
val out = Output(UInt(32.W))
})
 
4. Output
 
参考Input。
 
5. Flipped
 
参考Input。
 
6. Inout
 
Chisel中并无Inout类型,需使用Analog类型进行模拟。
 

Chisel3 - 接口方向(Direction)的更多相关文章

  1. Intel Edison —— 控制GPIO接口,网页显示传感器数值

    前言 原创文章,转载引用务必注明链接. 因为是使用Typora(markdown)写好然后复制到论坛的,推荐直接访问我的网站以获得更好地阅读体验. Intel XDK IoT 开发环境很久之前就上手了 ...

  2. Chisel3 - Tutorial - VendingMachine

    https://mp.weixin.qq.com/s/tDpUe9yhwC-2c1VqisFzMw   演示如何使用状态机.   参考链接: https://github.com/ucb-bar/ch ...

  3. Chisel3 - Tutorial - VendingMachineSwitch

    https://mp.weixin.qq.com/s/5lcMkenM2zTy-pYOXfRjyA   演示如何使用switch/is来实现状态机.   参考链接: https://github.co ...

  4. Chisel3 - Tutorial - Tbl

    https://mp.weixin.qq.com/s/e8vJ8claauBtiuedxYYaJw   实现可以动态索引的表.   参考链接: https://github.com/ucb-bar/c ...

  5. Chisel3 - Tutorial - Stack

    https://mp.weixin.qq.com/s/-AVJD1IfvNIJhmZM40DemA   实现后入先出(last in, first out)的栈.   参考链接: https://gi ...

  6. Chisel3 - Tutorial - Functionality

    https://mp.weixin.qq.com/s/3hDzpJiANdwp07hO03psyA   演示使用函数进行代码复用的方法.   参考链接: https://github.com/ucb- ...

  7. Chisel3 - Tutorial - Parity

    https://mp.weixin.qq.com/s/OtiQnE52PwdCpvmzJ6VFnA   奇偶发生器.统计输入中1的个数,如果为偶数则输出0,奇数则输出1.   参考链接: https: ...

  8. Chisel3 - Tutorial - ByteSelector

    https://mp.weixin.qq.com/s/RQg2ca1rwfVHx_QG-IOV-w   字节选择器.   参考链接: https://github.com/ucb-bar/chisel ...

  9. Chisel3 - Tutorial - ShiftRegister

    https://mp.weixin.qq.com/s/LKiXUgSnt3DzgFLa9zLCmQ   简单的寄存器在时钟的驱动下,逐个往下传值.   参考链接: https://github.com ...

随机推荐

  1. N - Marriage Match II 网络流

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3081 推荐博客:https://www.cnblogs.com/liuxin13/p/4728131. ...

  2. Git 中 “fatal: Not a valid object name: 'master'.”

    报错: fatal: Not a valid object name: 'master'. 问题主要是,master并不合法,也就是没有 git commit -m "" 提交一个 ...

  3. NEON中的vshr vshl vext中的位移参数必须为编译时字面常量

    NEON中的vshr指令中位移数量参数必须为compile time literal constant,因为该参数是被encoded as part pf ARM instruction itself ...

  4. C# 数据操作系列 - 5. EF Core 入门

    0.前言 上一章简单介绍了一下ORM框架,并手写了一个类似ORM的工具类.这一章将介绍一个在C#世界里大名鼎鼎的ORM框架--Entity Framework的Core版. Entity Framew ...

  5. Spring Junit--第一个测试

    配置成功后,需要启动测试用例! package com.cml.controller; import javax.annotation.Resource; import org.junit.Test; ...

  6. 简单mysql存储过程

    直接上代码: CREATE DEFINER=`root`@`localhost` PROCEDURE `sos`( ) BEGIN -- 创建一个临时表 DROP TABLE IF EXISTS fi ...

  7. MySQL事务及实现、隔离级别及锁与优化

    事务  事务是应用程序中一系列严密的操作,所有操作必须成功完成,否则在每个操作中所作的所有更改都会被撤消.事务是逻辑上的一组操作,要么都执行,要么都不执行. ACID简介 原子性(Atomicity) ...

  8. NullPointerException异常没有异常栈打印问题追踪

    今天去服务器后台看日志,发现有很多NullPointerException异常.我下意识的找异常栈,想看下到底是哪行代码导致了空指针.但是发现日志中只打印出了如下日志: null java.lang. ...

  9. GreenPlum执行gpfdist报错:libssl.so.1.0.0: cannot open shared object file: No such file or directory

    当你报这个错时,是因为你执行 ./gpfdist 时默认去找寻/usr/lib64的环境依赖,没有去找寻你gpfdist安装目录中lib的目录. 解决方法: 根据报错提示,将你gpfdist安装目录中 ...

  10. How To Mitigate Slow HTTP DoS Attacks in Apache HTTP Server

    http://www.acunetix.com/blog/web-security-zone/articles/slow-http-dos-attacks-mitigate-apache-http-s ...