Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: azonenberg/openfpga
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3c0011cf8913
Choose a base ref
...
head repository: azonenberg/openfpga
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fddaeedd1c05
Choose a head ref
  • 2 commits
  • 7 files changed
  • 1 contributor

Commits on Feb 16, 2017

  1. Updated to latest logtools

    azonenberg committed Feb 16, 2017
    Copy the full SHA
    26ff199 View commit details
  2. Continued initial work on PCF file support. Can now pass PCF files in…

    … test cmake script and parse the arg in gp4par, but the contents are ignored still
    azonenberg committed Feb 16, 2017
    Copy the full SHA
    fddaeed View commit details
Showing with 37 additions and 6 deletions.
  1. +5 −0 doc/gp4-hdl.tex
  2. +15 −2 src/gp4par/main.cpp
  3. +1 −1 src/log
  4. +13 −1 tests/greenpak4/CMakeLists.txt
  5. +1 −1 tests/greenpak4/slg46620v/CMakeLists.txt
  6. +1 −0 tests/greenpak4/slg46620v/Location.pcf
  7. +1 −1 tests/greenpak4/slg46620v/Location.v
5 changes: 5 additions & 0 deletions doc/gp4-hdl.tex
Original file line number Diff line number Diff line change
@@ -4274,6 +4274,11 @@ \subsection{\texttt{--boot-retry}}
to re-try the boot process in case of a NVM read failure. If not specified, the retry count defaults to 1. This option is
only supported for the SLG46140V.

\subsection{\texttt{--constraints}, \texttt{-c}}

The \texttt{--constraints} argument, which is also accepted as \texttt{-c}, is optional. If used, it must be immediately followed
by the name of a Physical Constraints File (PCF).

\subsection{\texttt{--debug}}

The \texttt{--debug} argument is optional. When it is specified once, it causes \namestyle{gp4par} to print
17 changes: 15 additions & 2 deletions src/gp4par/main.cpp
Original file line number Diff line number Diff line change
@@ -27,6 +27,9 @@ int main(int argc, char* argv[])
//Netlist file
string fname = "";

//Constraint file name
string pcfname = "";

//Output file
string ofname = "";

@@ -188,8 +191,18 @@ int main(int argc, char* argv[])
return 1;
}
}
else if(s == "-c" || s == "--constraints")
{
if(i+1 < argc)
pcfname = argv[++i];
else
{
printf("--constraints requires an argument\n");
return 1;
}
}

//assume it's the netlist file if it'[s the first non-switch argument
//assume it's the netlist file if it's the first non-switch argument
else if( (s[0] != '-') && (fname == "") )
fname = s;

@@ -329,7 +342,7 @@ void ShowUsage()
{
printf(// v 80th column
"Usage: gp4par [options] -p part -o bitstream.txt netlist.json\n"
" -c <file>\n"
" -c, --constraints <file>\n"
" Reads placement constraints from <file>\n"
" --debug\n"
" Prints lots of internal debugging information.\n"
2 changes: 1 addition & 1 deletion src/log
Submodule log updated from bfada5 to 8015d9
14 changes: 13 additions & 1 deletion tests/greenpak4/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ endfunction()
function(add_greenpak4_hiltest name part)

add_greenpak4_bitstream(${name} ${part})

add_executable(hiltest-${part}-${name}
${name}.cpp)
target_link_libraries(hiltest-${part}-${name}
@@ -65,16 +65,28 @@ function(add_greenpak4_bitstream name part)

add_greenpak4_netlist(${name} ${part})

# Add the PCF file if we have one
set(pcfargs1 "")
set(pcfargs2 "")
if(${ARGC} EQUAL 3)
set(pcfargs1 "--constraints")
set(pcfargs2 "${ARGV2}")
endif()

add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${name}.txt"
COMMAND gp4par "--stdout-only"
--usercode 41
# --quiet
--debug
--part ${part}
${pcfargs1}
${pcfargs2}
--output "${CMAKE_CURRENT_BINARY_DIR}/${name}.txt"
--logfile "${CMAKE_CURRENT_BINARY_DIR}/${name}-par.log"
"${CMAKE_CURRENT_BINARY_DIR}/${name}.json"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${name}.json"
DEPENDS "${pcfargs2}"
DEPENDS gp4par
COMMENT "Place and route netlist ${CMAKE_CURRENT_BINARY_DIR}/${name}.json"
VERBATIM)
2 changes: 1 addition & 1 deletion tests/greenpak4/slg46620v/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ add_greenpak4_bitstream(Dac SLG46620V)
add_greenpak4_bitstream(Delay SLG46620V)
add_greenpak4_bitstream(Ethernet SLG46620V)
add_greenpak4_bitstream(Inverters SLG46620V)
add_greenpak4_bitstream(Location SLG46620V)
add_greenpak4_bitstream(Location SLG46620V Location.pcf)
add_greenpak4_bitstream(Loop SLG46620V)
add_greenpak4_bitstream(POR SLG46620V)
add_greenpak4_bitstream(SPIToDCMP SLG46620V)
1 change: 1 addition & 0 deletions tests/greenpak4/slg46620v/Location.pcf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
set_loc f P15
2 changes: 1 addition & 1 deletion tests/greenpak4/slg46620v/Location.v
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ module Location(a, b, c, d, e, f);
(* LOC = "P16" *)
input wire e;

//LOC'd by constraint file
//LOC'd by constraint file to P15
output wire f;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////