Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
fifield and github-actions[bot] authored Oct 22, 2024
1 parent d63855b commit 4df0a03
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 43 deletions.
74 changes: 36 additions & 38 deletions lib/Targets/AIETargetSimulationFiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,44 +31,42 @@ mlir::LogicalResult AIETranslateSCSimConfig(mlir::ModuleOp module,
}

if (arch == AIEArch::AIE2p) {
output
<< "{\n"
<< " \"SimulationConfig\": {\n"
<< " \"device_json\": {\n"
<< " \"directory\": \"data/aie2p/devices\",\n"
<< " \"file\": \"aie2p_8x4_device.json\"\n"
<< " },\n"
<< " \"phy_device_file\": \"aie2p_8x4_device\",\n"
<< " \"aiearch\": \"aie2p\",\n"
<< " \"aie_freq\": 1000000000.0,\n"
<< " \"use_real_noc\": 1,\n"
<< " \"evaluate_fifo_depth\": 0,\n"
<< " \"noc_ip_block\": {\n"
<< " \"lib_path\": \"./sim/noc/liblnoc_tlm.so\",\n"
<< " \"traffic_file\": \"./sim/noc/noc_traffic.nts\",\n"
<< " \"config_file\": \"./sim/noc/noc_soln.ncr\"\n"
<< " },\n"
<< " \"pl_ip_block\": [\n"
<< " {\n"
<< " \"name\": \"ps_ps_main\",\n"
<< " \"ip\": \"ps\",\n"
<< " \"lib_path\": \"ps/ps.so\",\n"
<< " \"pl_freq\": 362500000.0,\n"
<< " \"axi_mm\": [\n"
<< " {\n"
<< " \"port_name\": \"ps_axi\",\n"
<< " \"direction\": \"ps_to_gm\",\n"
<< " \"noc_endpoint\": \"NOC_NMU128_X0Y5\",\n"
<< " \"bus_width\": 0\n"
<< " }\n"
<< " ],\n"
<< " \"event_bus\": []\n"
<< " }\n"
<< " ]\n"
<< " }\n"
<< "}\n";
}
else if (arch == AIEArch::AIE2) {
output << "{\n"
<< " \"SimulationConfig\": {\n"
<< " \"device_json\": {\n"
<< " \"directory\": \"data/aie2p/devices\",\n"
<< " \"file\": \"aie2p_8x4_device.json\"\n"
<< " },\n"
<< " \"phy_device_file\": \"aie2p_8x4_device\",\n"
<< " \"aiearch\": \"aie2p\",\n"
<< " \"aie_freq\": 1000000000.0,\n"
<< " \"use_real_noc\": 1,\n"
<< " \"evaluate_fifo_depth\": 0,\n"
<< " \"noc_ip_block\": {\n"
<< " \"lib_path\": \"./sim/noc/liblnoc_tlm.so\",\n"
<< " \"traffic_file\": \"./sim/noc/noc_traffic.nts\",\n"
<< " \"config_file\": \"./sim/noc/noc_soln.ncr\"\n"
<< " },\n"
<< " \"pl_ip_block\": [\n"
<< " {\n"
<< " \"name\": \"ps_ps_main\",\n"
<< " \"ip\": \"ps\",\n"
<< " \"lib_path\": \"ps/ps.so\",\n"
<< " \"pl_freq\": 362500000.0,\n"
<< " \"axi_mm\": [\n"
<< " {\n"
<< " \"port_name\": \"ps_axi\",\n"
<< " \"direction\": \"ps_to_gm\",\n"
<< " \"noc_endpoint\": \"NOC_NMU128_X0Y5\",\n"
<< " \"bus_width\": 0\n"
<< " }\n"
<< " ],\n"
<< " \"event_bus\": []\n"
<< " }\n"
<< " ]\n"
<< " }\n"
<< "}\n";
} else if (arch == AIEArch::AIE2) {
output
<< "{\n"
<< " \"SimulationConfig\": {\n"
Expand Down
5 changes: 4 additions & 1 deletion python/compiler/aiecc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,10 @@ def emit_partition(mlir_module_str, kernel_id="0x901", start_columns=None):
# XCLbin at all, since it is basically describing information
# which is already inherent in the CDO.
# For the time being, we just leave it here.
if len(device) > 0 and (int(device[0].device) in [int(aiedialect.AIEDevice.npu1), int(aiedialect.AIEDevice.npu2)]):
if len(device) > 0 and (
int(device[0].device)
in [int(aiedialect.AIEDevice.npu1), int(aiedialect.AIEDevice.npu2)]
):
start_columns = [0]
else:
start_columns = list(range(1, 6 - num_cols))
Expand Down
7 changes: 3 additions & 4 deletions test/unit_tests/aie2p/00_itsalive/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

#include <stdio.h>

int
main(int argc, char *argv[]) {
printf("Hello, world.\n");
return 0;
int main(int argc, char *argv[]) {
printf("Hello, world.\n");
return 0;
}

0 comments on commit 4df0a03

Please sign in to comment.