Skip to content

Commit

Permalink
Small fixes.
Browse files Browse the repository at this point in the history
Signed-off-by: fruffy <[email protected]>
  • Loading branch information
fruffy committed Feb 15, 2025
1 parent f1872f2 commit a2c1c66
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 2 additions & 0 deletions backends/tofino/bf-asm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ if (ENABLE_GTESTS)
target_link_libraries (gtestasm PRIVATE bfas_lib gtest ${BFASM_LIB_DEPS})
target_compile_options (gtestasm PRIVATE -Wall -Wextra -ggdb -O3
-Wno-unused-parameter -Wno-sign-compare)
# Disable errors for warnings. FIXME: Get rid of this.
target_compile_options(gtestasm PUBLIC "-Wno-error")

# Add to CTests - but this is in the BFASM project viz build/bf-asm, not build/p4c
add_test (NAME gtestasm COMMAND gtestasm WORKING_DIRECTORY ${P4C_BINARY_DIR})
Expand Down
2 changes: 1 addition & 1 deletion backends/tofino/bf-asm/gtest/parser-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <gtest/gtest.h>

#include "backends/tofino/bf-asm/bfas.h"
#include "backends/tofino/bf-asm/jbay/parser-tofino-jbay.h"
#include "backends/tofino/bf-asm/parser-tofino-jbay.h"

namespace {

Expand Down
1 change: 0 additions & 1 deletion backends/tofino/bf-asm/gtest/register-matcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <iosfwd>
#include <sstream>

#include "backends/tofino/bf-asm/register-matcher.h"
#include "backends/tofino/bf-asm/ubits.h"
#include "lib/bitvec.h"

Expand Down
2 changes: 1 addition & 1 deletion backends/tofino/bf-asm/walle/walle.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ def dump_binary(args, binary_cache, out_file):
# Memories are ram-word addressed, not byte addressed
"memories": lambda addr: addr >> 4,
# TODO: use actual func once model+indirect writes are fixed
"regs": lambda addr: addr
"regs": lambda addr: addr,
# # Regs are give in 32-bit PCIe address space and need to be
# # converted to 42-bit chip address space
# "regs": lambda addr: ((addr&0x0FF80000)<<14)|(addr&0x0007FFFF)
Expand Down
6 changes: 3 additions & 3 deletions backends/tofino/compiler_interfaces/tools/create_phv_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,9 @@ def produce_containers_node(context):

rec = OrderedDict()
rec["field_name"] = field_name
rec[
"field_class"
] = "pkt" # FIXME: Don't know how to get the value from context.json.
rec["field_class"] = (
"pkt" # FIXME: Don't know how to get the value from context.json.
)
rec["field_msb"] = field_msb
rec["field_lsb"] = field_lsb
rec["phv_msb"] = phv_msb
Expand Down

0 comments on commit a2c1c66

Please sign in to comment.