【发布时间】:2016-04-07 13:30:22
【问题描述】:
我是 Verilog 的初学者,我有这个任务。
max_pass 电路过滤一个 32 位的数组,使得最大长度为 1 的块保持在原位,其他的都为 0。
一个块/集由至少 2 位 1 组成。
电路必须是组合的,max_pass模块的接口是:
input [31:0] din ;
output [31:0] dout ;
电路没有记忆。输出会立即看到输入的任何变化。
建议使用模块化和分层设计。
示例
Example 1
input: 01011100111111111111011100101010
output: 00000000111111111111000000000000
The maximum length of a block is 12.
Example 2
input: 00100111111001001011111100101101
output: 00000111111000000011111100000000
Two blocks of maximum length of 6.
Example 3
input: 11011011011011011011011011011011
output: 11011011011011011011011011011011
Eleven blocks of maximum length of 2.
【问题讨论】:
-
因为这不是一个代码编写服务,如果你能展示你尝试过的东西会很好。首先是在 Verilog 中编写接口。
-
电路只允许通过最大1位块。
标签: arrays module verilog bits maxlength