Skip to content

Commit

Permalink
cellhelp: Rename short_desc to title
Browse files Browse the repository at this point in the history
  • Loading branch information
KrystalDelusion committed Apr 10, 2024
1 parent d955d6f commit 4ddfa90
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions kernel/register.cc
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ struct SimHelper {
else
return name;
}
string short_desc;
string title;
string ports;
string desc;
string code;
Expand Down Expand Up @@ -887,8 +887,8 @@ struct HelpPass : public Pass {

// make header
string title_line;
if (cell.short_desc.length())
title_line = stringf("%s - %s", cell.name.c_str(), cell.short_desc.c_str());
if (cell.title.length())
title_line = stringf("%s - %s", cell.name.c_str(), cell.title.c_str());
else title_line = cell.name;
string underline = "\n";
underline.insert(0, title_line.length(), '=');
Expand Down Expand Up @@ -988,7 +988,7 @@ struct HelpPass : public Pass {
SimHelper help_cell = cell_help_messages.cell_help.at(args[1]);
if (help_cell.ver == "2") {
log("\n %s %s\n", help_cell.name.c_str(), help_cell.ports.c_str());
log("\n%s\n", help_cell.short_desc.c_str());
log("\n%s\n", help_cell.title.c_str());
log("%s\n", help_cell.desc.c_str());
log("Run 'help %s+' to display the Verilog model for this cell type.\n", args[1].c_str());
log("\n");
Expand Down
4 changes: 2 additions & 2 deletions techlibs/common/cellhelp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class SimHelper:
name: str = ""
short_desc: str = ""
title: str = ""
ports: str = ""
desc: list[str]
code: list[str]
Expand All @@ -18,7 +18,7 @@ def __init__(self) -> None:
def __str__(self) -> str:
val = "tempCell = {\n"
val += f' {json.dumps(self.name)},\n'
val += f' {json.dumps(self.short_desc)},\n'
val += f' {json.dumps(self.title)},\n'
val += f' {json.dumps(self.ports)},\n'
val += ' ' + json.dumps("\n".join(self.desc)) + ',\n'
val += ' ' + json.dumps("\n".join(self.code)) + ',\n'
Expand Down
2 changes: 1 addition & 1 deletion techlibs/common/simlib.v
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ endmodule
// --------------------------------------------------------

//* ver 2
//* short_desc Arithmetic logic unit
//* title Arithmetic logic unit
//- A building block supporting both binary addition/subtraction operations, and
//- indirectly, comparison operations.
//- Typically created by the `alumacc` pass, which transforms:
Expand Down

0 comments on commit 4ddfa90

Please sign in to comment.