首页 技术 正文
技术 2022年11月11日
0 收藏 307 点赞 2,537 浏览 606 个字

https://mp.weixin.qq.com/s/OmQRQU2mU2I5d-qtV4PAwg

 二选一输出。 参考链接https://github.com/wjcdx/jchdl/blob/master/src/org/jchdl/model/rtl/example/Mux.java 1.创建Mux.java, 并生成构造方法和logic()方法略 2. 根据逻辑原理,添加输入输出接口​jchdl – RTL实例 – Mux​输入输出线作为类成员存在。使用注解标明是input port还是output port。 3. 在构造方法中搜集输入输出线并调用construct()方法​jchdl – RTL实例 – Mux​首先调用父类即Module类的构造方法,以构建模块hierarchy。然后逐个把输入输出参数与input/output port对应上。然后调用construct()方法构造模块(调用一次logic()方法,搜集模块的assign/always代码块、子模块)。 4. 在logic()方法中创建assign/always代码块,以及子模块​jchdl – RTL实例 – Mux​这里包含一个assign代码块:当发生a, b,sel的变化事件时,执行lambda表达式的方法,以更新out的值。 5. 创建inst静态方法方便后续使用略 6. 创建main方法执行验证​jchdl – RTL实例 – Mux​运行结果为:​jchdl – RTL实例 – Mux​ 7. 生成Verilog生成定制化模块名:略 调用toVerilog()方法生成Verilog实现。略 执行结果如下:​jchdl – RTL实例 – Mux​ 

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,491
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,907
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,740
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,492
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,132
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,293