Description: module counter_modk(clock, reset_n, Q)
parameter n = 4
parameter k = 16
input clock, reset_n
output [n-1:0] Q
reg [n-1:0] Q
always @(posedge clock or negedge reset_n)
begin
if (~reset_n)
Q <= d0
else begin
Q <= Q + 1 b1
if (Q == k-1)
Q <= d0
end
end
endmodule
To Search:
File list (Check if you may need any files):
lab4\db\part3.asm.qmsg
....\..\part3.asm_labs.ddb
....\..\part3.cbx.xml
....\..\part3.cmp.bpm
....\..\part3.cmp.cdb
....\..\part3.cmp.ecobp
....\..\part3.cmp.hdb
....\..\part3.cmp.kpt
....\..\part3.cmp.logdb
....\..\part3.cmp.rdb
....\..\part3.cmp.tdb
....\..\part3.cmp0.ddb
....\..\part3.cmp_merge.kpt
....\..\part3.db_info
....\..\part3.eco.cdb
....\..\part3.fit.qmsg
....\..\part3.hier_info
....\..\part3.hif
....\..\part3.lpc.html
....\..\part3.lpc.rdb
....\..\part3.lpc.txt
....\..\part3.map.bpm
....\..\part3.map.cdb
....\..\part3.map.ecobp
....\..\part3.map.hdb
....\..\part3.map.kpt
....\..\part3.map.logdb
....\..\part3.map.qmsg
....\..\part3.map_bb.cdb
....\..\part3.map_bb.hdb
....\..\part3.map_bb.logdb
....\..\part3.pre_map.cdb
....\..\part3.pre_map.hdb
....\..\part3.rtlv.hdb
....\..\part3.rtlv_sg.cdb
....\..\part3.rtlv_sg_swap.cdb
....\..\part3.sgdiff.cdb
....\..\part3.sgdiff.hdb
....\..\part3.sld_design_entry.sci
....\..\part3.sld_design_entry_dsc.sci
....\..\part3.syn_hier_info
....\..\part3.tan.qmsg
....\..\part3.tis_db_list.ddb
....\..\part3.tmw_info
....\..\part3_global_asgn_op.abo
....\..\part4.asm.qmsg
....\..\part4.asm_labs.ddb
....\..\part4.cbx.xml
....\..\part4.cmp.bpm
....\..\part4.cmp.cdb
....\..\part4.cmp.ecobp
....\..\part4.cmp.hdb
....\..\part4.cmp.kpt
....\..\part4.cmp.logdb
....\..\part4.cmp.rdb
....\..\part4.cmp.tdb
....\..\part4.cmp0.ddb
....\..\part4.cmp_merge.kpt
....\..\part4.db_info
....\..\part4.eco.cdb
....\..\part4.fit.qmsg
....\..\part4.hier_info
....\..\part4.hif
....\..\part4.lpc.html
....\..\part4.lpc.rdb
....\..\part4.lpc.txt
....\..\part4.map.bpm
....\..\part4.map.cdb
....\..\part4.map.ecobp
....\..\part4.map.hdb
....\..\part4.map.kpt
....\..\part4.map.logdb
....\..\part4.map.qmsg
....\..\part4.map_bb.cdb
....\..\part4.map_bb.hdb
....\..\part4.map_bb.logdb
....\..\part4.pre_map.cdb
....\..\part4.pre_map.hdb
....\..\part4.rpp.qmsg
....\..\part4.rtlv.hdb
....\..\part4.rtlv_sg.cdb
....\..\part4.rtlv_sg_swap.cdb
....\..\part4.sgate.rvd
....\..\part4.sgate_sm.rvd
....\..\part4.sgdiff.cdb
....\..\part4.sgdiff.hdb
....\..\part4.sld_design_entry.sci
....\..\part4.sld_design_entry_dsc.sci
....\..\part4.syn_hier_info
....\..\part4.tan.qmsg
....\..\part4.tis_db_list.ddb
....\..\part4.tmw_info
....\..\part4_global_asgn_op.abo
....\..\part5.asm.qmsg
....\..\part5.asm_labs.ddb
....\..\part5.cbx.xml
....\..\part5.cmp.bpm
....\..\part5.cmp.cdb
....\..\part5.cmp.ecobp
....\..\part5.cmp.hdb