Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1# -------------------------------------------------------------------------------------------------- 

2# Copyright (c) Lukas Vik. All rights reserved. 

3# 

4# This file is part of the tsfpga project. 

5# https://tsfpga.com 

6# https://gitlab.com/tsfpga/tsfpga 

7# -------------------------------------------------------------------------------------------------- 

8 

9 

10class BuildStepTclHook: 

11 

12 """ 

13 Represent a TCL file that shall be used as hook in one of the build steps. 

14 """ 

15 

16 def __init__(self, tcl_file, hook_step): 

17 """ 

18 Arguments: 

19 tcl_file (`pathlib.Path`): Path to a TCL file. 

20 hook_step (str): Name of a build step, e.g. "STEPS.ROUTE_DESIGN.TCL.PRE". 

21 """ 

22 self.tcl_file = tcl_file 

23 self.hook_step = hook_step 

24 

25 @property 

26 def step_is_synth(self): 

27 """ 

28 True if the build step is in synthesis. False otherwise. 

29 """ 

30 return "synth" in self.hook_step.lower() 

31 

32 def __str__(self): 

33 result = str(self.__class__.__name__) + ":" 

34 return result + f"{self.hook_step}:{self.tcl_file}"