From 9fab167e189f682d53cfe6ed12e4cc645d39025b Mon Sep 17 00:00:00 2001 From: Klagarge Date: Fri, 23 Feb 2024 16:14:04 +0100 Subject: [PATCH] add sawtooth --- .gitignore | 110 ++++++++++++++++++ .../hdl/sawtoothGen_studentVersion.vhd | 18 ++- 2 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6ea7def --- /dev/null +++ b/.gitignore @@ -0,0 +1,110 @@ +ipcache +*.ip_user_files +*.dcp +*.cache +*.data +*.xpr +*.log +*.bld +*.chk +*.cmd_log +*.cxt +*.gise +*.gyd +*.jed +*.lso +*.mfd +*.nga +*.ngc +*.ngd +*.ngr +*.pad +*.pnx +*.prj +*.rpt +*.stx +*.syr +*.tim +*.tspec +*.vm6 +*.xst +*.html +*.xrpt +*.err +*_html +*.sld +*.txt +*.qsys +*.csv +xst +netgen +iseconfig +xlnx_auto* +_ngo +_xmsgs +component.xml +*.jou +xgui +*.runs +*.srcs +*.sdk +.Xil +*_INFO.txt +*_dump.txt +db +*.asm.rpt +*.done +*.eda.rpt +*.fit.* +*.map.* +*.sta.* +*.qsf +*.qpf +*.qws +*.sof +*.rbf +system_qsys_script.tcl +hc_output +hps_isw_handoff +hps_sdram_*.csv +incremental_db +system_bd/ +reconfig_mif +*.sopcinfo +*.jdi +*.pin +*.os +*webtalk* +*.xml +*.hw +gui +.timestamp_intel +temporary_case_dependencies.mk +*.zip +*.str +*.vcd +*.wlf +transcript +tags +boot_bin +_info +_vmake +*.qdb +*.qpg +*.qtl +*.xpe +*.gen* +*.xsa +*.pdi +library/**/bd/bd.tcl +*.syn.smsg +*.syn.summary +qdb +tmp-clearbox +*.bin +__pycache__ +_build +.qsys_edit +.github/CODEOWNERS +.github/PULL_REQUEST_TEMPLATE.md +library/**/.lock \ No newline at end of file diff --git a/01-WaveformGenerator/WaveformGenerator/hdl/sawtoothGen_studentVersion.vhd b/01-WaveformGenerator/WaveformGenerator/hdl/sawtoothGen_studentVersion.vhd index 892bd7d..caf49f6 100644 --- a/01-WaveformGenerator/WaveformGenerator/hdl/sawtoothGen_studentVersion.vhd +++ b/01-WaveformGenerator/WaveformGenerator/hdl/sawtoothGen_studentVersion.vhd @@ -1,5 +1,21 @@ ARCHITECTURE studentVersion OF sawtoothGen IS + + signal counter : unsigned(bitNb-1 downto 0); + BEGIN - sawtooth <= (others => '0'); + + count: process(reset, clock, en, step) + begin + if reset = '1' then + counter <= (others => '0'); + elsif rising_edge(clock) then + if en = '1' then + counter <= counter + step; + end if; + end if; + end process count; + + sawtooth <= counter; + END ARCHITECTURE studentVersion;