-
Notifications
You must be signed in to change notification settings - Fork 867
ram: add nangate45 cross-platform regression test #9680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,5 +2,6 @@ or_integration_tests( | |
| "ram" | ||
| TESTS | ||
| make_8x8 | ||
| make_7x7_nangate45 | ||
| ) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../../test/Nangate45 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
| # Copyright (c) 2024-2025, The OpenROAD Authors | ||
| # | ||
| # Test: ram/make_7x7_nangate45 | ||
| # Verifies that generate_ram works correctly with the Nangate45 technology | ||
| # node using an intentionally odd 7-word x 1-byte (56-bit) configuration | ||
| # to exercise the decoder logic on a non-power-of-2 word count. | ||
| # Addresses Issue #9468. | ||
|
|
||
| source "helpers.tcl" | ||
|
|
||
| set_thread_count [expr [cpu_count] / 4] | ||
|
|
||
| read_liberty Nangate45/Nangate45_typ.lib | ||
|
|
||
| read_lef Nangate45/Nangate45_tech.lef | ||
| read_lef Nangate45/Nangate45.lef | ||
|
|
||
| set behavioral_file [make_result_file make_7x7_nangate45_behavioral.v] | ||
|
|
||
| generate_ram \ | ||
| -bytes_per_word 1 \ | ||
| -word_count 7 \ | ||
| -read_ports 1 \ | ||
| -storage_cell DFF_X1 \ | ||
| -power_pin VDD \ | ||
| -ground_pin VSS \ | ||
| -routing_layer {metal1 0.07} \ | ||
| -ver_layer {metal2 0.07 0.42} \ | ||
| -hor_layer {metal3 0.07 0.42} \ | ||
| -filler_cells {FILLCELL_X1 FILLCELL_X2 FILLCELL_X4 FILLCELL_X8} \ | ||
| -write_behavioral_verilog $behavioral_file | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we need to test the behavioral flag. This really isn't significantly different from the 8x8 test. |
||
|
|
||
| set lef_file [make_result_file make_7x7_nangate45.lef] | ||
| write_abstract_lef $lef_file | ||
| diff_files make_7x7_nangate45.lefok $lef_file | ||
|
|
||
| set def_file [make_result_file make_7x7_nangate45.def] | ||
| write_def $def_file | ||
| diff_files make_7x7_nangate45.defok $def_file | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see no defok
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nor lefok |
||
|
|
||
| diff_files make_7x7_nangate45_behavioral.vok $behavioral_file | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think .vok is needed for this test |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| module RAM7x8 ( | ||
| clk, | ||
| D, | ||
| Q, | ||
| addr_rw, | ||
| we | ||
| ); | ||
| input clk; | ||
| input [7:0] D; | ||
| output reg [7:0] Q; | ||
| input [2:0] addr_rw; | ||
| input [0:0] we; | ||
|
|
||
| // memory array declaration | ||
| reg [7:0] mem[0:6]; | ||
|
|
||
| // write logic | ||
| integer i; | ||
| always @(posedge clk) begin | ||
| for (i = 0; i < 1; i = i + 1) begin | ||
| if (we[i]) begin | ||
| mem[addr_rw][i*8 +:8] <= D[i*8 +:8]; | ||
| end | ||
| end | ||
| end | ||
|
|
||
| // read logic | ||
| always @(*) begin | ||
| Q = mem[addr_rw]; | ||
| end | ||
|
|
||
| endmodule |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| record_tests { | ||
| make_8x8 | ||
| make_7x7_nangate45 | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How were these values determined?