Forum Discussion
sisa
New Contributor
7 years agoPlease, help me to correct verilog module for alarm temperature
module alarmsystem(clr,clk,alarm,CT,WT,Display); input clk,clr; input [31:0]CT; input [31:0]WT; output alarm; output [31:0]Display; wire reg_ld1,reg_ld2,reg_ld3,reg_ld4,reg_ld5; wire reg_clr1,...
Vicky1
Regular Contributor
7 years agoHi,
Have you performed simulation? if not, try to write testbench for the design & check the simulation result.
refer the below old thread for testbench,
https://forums.intel.com/s/question/0D50P00004AbjLrSAJ/creating-test-bench-code-on-quartus-prime
Please provide bit more information about error/issue you have, if possible provide screenshot of waveform window.
Regards,
Vikas
sisa
New Contributor
7 years agoUse the RTL design process to create an alarm system that sets a single-bit output alarm to 1 when the average temperature of four consecutive samples meets or exceeds a user-defined threshold value (set your own threshold). A 32-bit unsigned input CT indicates the current temperature, and a 32-bit unsigned input WT indicates the warning threshold. Samples should be taken every 5 clock cycles. A single-bit input clr when 1 disables the alarm and the sampling process. Start by capturing the desired system behaviour as an HLSM, and then convert to a controller/datapath. Write your Verilog code and download your program into FPGA. Set LED as your alarm indicator.