OpenXiangShan / HuanCun

Open-source high-performance non-blocking cache
Other
67 stars 35 forks source link

XSPerfAccumulate: change magicStr #151

Closed Tang-Haojin closed 1 year ago

Tang-Haojin commented 1 year ago

The original magic string, 9527, used for "%m" may be too general. I would propose changing it.

poemonsense commented 1 year ago

should the related transforms be changed as well? Otherwise huancun cannot be correctly built

Tang-Haojin commented 1 year ago

should the related transforms be changed as well? Otherwise huancun cannot be correctly built

PrintModuleName is only performed in XiangShan and I will change it later as well. As it only replaces magic string with "%m" in printf, it may not affect the buiding process of HuanCun.

Tang-Haojin commented 1 year ago

For chisel 3.6.0, 9527 may be Okay since it only change strings in printf scopes. But in chisel 5 or higher, We may use sed on verilog output to replace the magic string manually. I am concerned that 9527 may be a little risky.

poemonsense commented 1 year ago

OK. Then I think we should move the PrintModuleName to utility? Maybe in the future

poemonsense commented 1 year ago

Probably move XSPerfUtils to the utility package

Tang-Haojin commented 1 year ago

Probably move XSPerfUtils to the utility package

I agree. And this transform should have been also performed in HuanCun.