@@ -21,70 +21,74 @@ def setUp(self):
2121
2222 ParamTestBase .set_up (self , "cva6" )
2323
24+ def get_exp_sdc (self , place_site , pdk_version ):
25+ """Returns the expected SDC file path"""
26+
27+ if pdk_version in ["0.2a" , "0.3" ]:
28+ if place_site == "ra02h138_DST_45CPP" :
29+ return os .path .join (
30+ self ._design_full_dir , f"constraint_{ pdk_version } _6T.sdc"
31+ )
32+ return os .path .join (
33+ self ._design_full_dir , f"constraint_{ pdk_version } _8T.sdc"
34+ )
35+
36+ return os .path .join (self ._design_full_dir , "constraint.sdc" )
37+
2438 def test_pdk_0p2_default (self ):
25- """Tests PDK 0.2 SDC file - should be default for both 6T and 8T"""
39+ """
40+ Tests PDK 0.2
41+ """
2642
43+ front_end = ""
2744 pdk_version = ""
28- exp_sdc = os .path .join (self ._design_full_dir , "constraint.sdc" )
29- for front_end in self ._front_end_list :
30- for place_site in self ._ibm_site_list :
31- self .execute_cmd (
32- place_site , pdk_version , front_end , "SDC_FILE" , exp_sdc
33- )
45+ for place_site in self ._ibm_site_list :
46+ exp_sdc = self .get_exp_sdc (place_site , pdk_version )
47+ self .execute_cmd (place_site , pdk_version , front_end , "SDC_FILE" , exp_sdc )
3448
3549 def test_pdk_0p2 (self ):
36- """Tests PDK 0.2 SDC file - should be default for both 6T and 8T"""
50+ """
51+ Tests PDK 0.2
52+ """
3753
54+ front_end = ""
3855 pdk_version = "0.2"
39- exp_sdc = os .path .join (self ._design_full_dir , "constraint.sdc" )
40- for front_end in self ._front_end_list :
41- for place_site in self ._ibm_site_list :
42- self .execute_cmd (
43- place_site , pdk_version , front_end , "SDC_FILE" , exp_sdc
44- )
56+ for place_site in self ._ibm_site_list :
57+ exp_sdc = self .get_exp_sdc (place_site , pdk_version )
58+ self .execute_cmd (place_site , pdk_version , front_end , "SDC_FILE" , exp_sdc )
4559
4660 def test_pdk_0p2a (self ):
4761 """
48- Tests PDK 0.2a SDC file
49- 6T: constraint_0.2a_6T.sdc
50- 8T: constraint_0.2a_8T.sdc
62+ Tests PDK 0.2a
5163 """
5264
65+ front_end = ""
5366 pdk_version = "0.2a"
54- for front_end in self ._front_end_list :
55- for place_site in self ._synopsys_site_list :
56- if place_site == "" :
57- track_height = "8T"
58- else :
59- track_height = self .get_track_height (place_site )
60- exp_sdc = os .path .join (
61- self ._design_full_dir ,
62- f"constraint_{ pdk_version } _{ track_height } .sdc" ,
63- )
64- self .execute_cmd (
65- place_site , pdk_version , front_end , "SDC_FILE" , exp_sdc
66- )
67+ for place_site in self ._synopsys_site_list :
68+ exp_sdc = self .get_exp_sdc (place_site , pdk_version )
69+ self .execute_cmd (place_site , pdk_version , front_end , "SDC_FILE" , exp_sdc )
70+
71+ def test_pdk_0p15 (self ):
72+ """
73+ Tests PDK 0.15
74+ """
75+
76+ front_end = ""
77+ pdk_version = "0.15"
78+ for place_site in self ._synopsys_site_list :
79+ exp_sdc = self .get_exp_sdc (place_site , pdk_version )
80+ self .execute_cmd (place_site , pdk_version , front_end , "SDC_FILE" , exp_sdc )
6781
6882 def test_pdk_0p3 (self ):
6983 """
70- Tests PDK 0.3 SDC file
71- 6T: constraint_0.3_6T.sdc
72- 8T: constraint_0.3_8T.sdc
84+ Tests PDK 0.3
7385 """
7486
87+ front_end = ""
7588 pdk_version = "0.3"
76- for front_end in self ._front_end_list :
77- for place_site in self ._synopsys_site_list :
78- if place_site == "" :
79- track_height = "8T"
80- else :
81- track_height = self .get_track_height (place_site )
82- exp_sdc = os .path .join (
83- self ._design_full_dir , f"constraint_0.3_{ track_height } .sdc"
84- )
85- self .execute_cmd (
86- place_site , pdk_version , front_end , "SDC_FILE" , exp_sdc
87- )
89+ for place_site in self ._synopsys_site_list :
90+ exp_sdc = self .get_exp_sdc (place_site , pdk_version )
91+ self .execute_cmd (place_site , pdk_version , front_end , "SDC_FILE" , exp_sdc )
8892
8993
9094if __name__ == "__main__" :
0 commit comments