hdl / bazel_rules_hdl

Hardware Description Language (Verilog, VHDL, Chisel, nMigen, etc) with open tools (Yosys, Verilator, OpenROAD, etc) rules for Bazel (https://bazel.build)
Apache License 2.0
120 stars 45 forks source link

place_and_route: Syntax of generated textproto files #295

Closed mczyz-antmicro closed 8 months ago

mczyz-antmicro commented 8 months ago

Textproto files are generated from generate_power_results and generate_area_results, which are used in the global_routing.tcl. What syntax are they meant to be? By file extension, I presume that they are meant to be protobuf files, but unfortunately they are not consistent with protobuf syntax (you can test with protolinter). I propose to make effort to make these files consistent.

Example of generated file:

total_package_power_watts: 0.0059173996560275555
corner: "asap7-sc7p5t_rev28_rvt-ccs_ss_SS"
power_maginitude: "p"
QuantamHD commented 8 months ago

They are text protos. https://protobuf.dev/reference/protobuf/textformat-spec/

mczyz-antmicro commented 8 months ago

Exactly what I was looking for is at the bottom of the page you linked, thanks!

Working programmatically with textproto files:

https://github.com/protocolbuffers/txtpbfmt

QuantamHD commented 8 months ago

https://protobuf.dev/reference/cpp/api-docs/google.protobuf.text_format/

If you want to parse them