[main] added Cadence SYN and PaR scripts - initial version

[main] added Cadence SYN and PaR scripts - initial version
This commit is contained in:
ivanpiatak
2023-12-05 10:07:34 +03:00
committed by GitHub
parent af08ededed
commit 5a669cc839
10 changed files with 10540 additions and 0 deletions

46
src/rtl/PWM.v Normal file
View File

@@ -0,0 +1,46 @@
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 14:15:19 05/19/2018
// Design Name:
// Module Name: PWM
// Project Name:
// Target Devices:
// Tool versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module PWM(clk, reset, LED);
input clk, reset;
output LED;
reg [26:0] cnt;
reg [3:0] pwm_cnt;
//Input counter
always @(posedge clk)
if (reset)
cnt <= 27'd0;
else
cnt<=cnt+27'd1;
wire [3:0] pwm_inp = cnt[26] ? ~cnt[25:22]: cnt[25:22];
//PWM comparator
always @(posedge clk)
if (reset)
pwm_cnt <= 4'd0;
else
pwm_cnt <= pwm_cnt + 4'd1;
assign LED = (pwm_cnt<pwm_inp);
endmodule

1
src/rtl/filelist.v Normal file
View File

@@ -0,0 +1 @@
`include "PWM.v"

50
src/sdc/PWM.sdc Normal file
View File

@@ -0,0 +1,50 @@
### Stage: "Synthesis and PaR"
### File description: "Constraints for the design"
# SET LIB UNITS
set_units -time 1.0ns;
set_units -capacitance 1.0pF;
set_max_capacitance 0.5 [all_outputs]
### ====================== CLOCKS ===========================
# CLOCK and UNCERTAINTY
set CLK_NAME "clk";
set CLK_PERIOD 40.0;
set CLK_UNCERT 0.2;
# CLK WAIVEFORM RISE-FALL TIMES
set MINRISE 0.20
set MAXRISE 0.25
set MINFALL 0.20
set MAXFALL 0.25
# IO DELAYS
set INPUT_DELAY_CLK [expr $CLK_PERIOD/2.0]
set OUTPUT_DELAY_CLK [expr $CLK_PERIOD/2.0]
create_clock -name $CLK_NAME -period $CLK_PERIOD -waveform "0 [expr $CLK_PERIOD/2]" [get_ports CLK_NAME]
set_clock_uncertainty $CLK_UNCERT [get_clocks $CLK_NAME]
set_clock_transition -rise -min $MINRISE [get_clocks $CLK_NAME]
set_clock_transition -rise -max $MAXRISE [get_clocks $CLK_NAME]
set_clock_transition -fall -min $MINFALL [get_clocks $CLK_NAME]
set_clock_transition -fall -max $MAXFALL [get_clocks $CLK_NAME]
#set_input_delay -clock "clk" -max $INPUT_DELAY_CLK [all_inputs]
#set_input_delay -clock "clk" -min $INPUT_DELAY_CLK [all_inputs]
set_output_delay -clock "clk" -max $OUTPUT_DELAY_CLK [all_outputs]
set_output_delay -clock "clk" -min $OUTPUT_DELAY_CLK [all_outputs]
### ====================== RESETS ===========================
set RST_NAME "reset"
set_ideal_network [get_ports $RST_NAME]
set_false_path -from [get_ports $RST_NAME]