mirror of
https://github.com/verilator/verilator.git
synced 2025-02-02 11:41:55 +00:00
Internals: Add TREEOPC() that executes only when m_doCpp==true (#2759)
This commit is contained in:
parent
5cadabeb2d
commit
878a252437
@ -2223,6 +2223,7 @@ private:
|
|||||||
|
|
||||||
// v--- * * This op done on Verilog or C+++ mode, in all non-m_doConst stages
|
// v--- * * This op done on Verilog or C+++ mode, in all non-m_doConst stages
|
||||||
// v--- *1* These ops are always first, as we warn before replacing
|
// v--- *1* These ops are always first, as we warn before replacing
|
||||||
|
// v--- *C* This op is a (C)++ op, only in m_doCpp mode
|
||||||
// v--- *V* This op is a (V)erilog op, only in m_doV mode
|
// v--- *V* This op is a (V)erilog op, only in m_doV mode
|
||||||
// v--- *A* This op works on (A)ll constant children, allowed in m_doConst mode
|
// v--- *A* This op works on (A)ll constant children, allowed in m_doConst mode
|
||||||
// v--- *S* This op specifies a type should use (S)hort-circuiting of its lhs op
|
// v--- *S* This op specifies a type should use (S)hort-circuiting of its lhs op
|
||||||
|
@ -88,7 +88,7 @@ class Cpt:
|
|||||||
# doflag "S" indicates an op specifying short-circuiting for a type.
|
# doflag "S" indicates an op specifying short-circuiting for a type.
|
||||||
match = re.search(
|
match = re.search(
|
||||||
# 1 2 3 4
|
# 1 2 3 4
|
||||||
r'TREEOP(1?)([ASV]?)\s*\(\s*\"([^\"]*)\"\s*,\s*\"([^\"]*)\"\s*\)',
|
r'TREEOP(1?)([ACSV]?)\s*\(\s*\"([^\"]*)\"\s*,\s*\"([^\"]*)\"\s*\)',
|
||||||
func)
|
func)
|
||||||
match_skip = re.search(r'TREE_SKIP_VISIT\s*\(\s*\"([^\"]*)\"\s*\)',
|
match_skip = re.search(r'TREE_SKIP_VISIT\s*\(\s*\"([^\"]*)\"\s*\)',
|
||||||
func)
|
func)
|
||||||
@ -115,6 +115,8 @@ class Cpt:
|
|||||||
mif = "m_doNConst"
|
mif = "m_doNConst"
|
||||||
elif doflag == 'A':
|
elif doflag == 'A':
|
||||||
mif = ""
|
mif = ""
|
||||||
|
elif doflag == 'C':
|
||||||
|
mif = "m_doCpp"
|
||||||
elif doflag == 'S':
|
elif doflag == 'S':
|
||||||
mif = "m_doNConst" # Not just for m_doGenerate
|
mif = "m_doNConst" # Not just for m_doGenerate
|
||||||
elif doflag == 'V':
|
elif doflag == 'V':
|
||||||
|
Loading…
Reference in New Issue
Block a user