q7a专题

Exams/ece241 2014 q7a(Counter1-12)

项目场景: Design a 1-12 counter with the following inputs and outputs: Reset Synchronous active-high reset that forces the counter to 1 Enable Set high for the counter to run Clk Positive edge-triggered

HDLbits: ece241 2014 q7a

题目的意思是子模块四位二进制改成十二进制计数,并且是1-12。 因此初始的加载数据肯定为c_d = 1,关键点在于什么时候load,即load的条件,首先当子模块输出达到12时(且此时enable要是1)肯定要load,用Q=12&enable条件判断,其次reset置位的时候也要load用reset=1条件判断 module top_module (input clk,input reset