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: 3afbc55e4da2
Choose a base ref
...
head repository: azonenberg/openfpga
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0e6650e9ea45
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Feb 18, 2017

  1. gp4par: Prefixed invalid-arg error messages with "ERROR:" for easier …

    …filtering in automated build environments
    azonenberg committed Feb 18, 2017
    Copy the full SHA
    6a518fe View commit details
  2. Copy the full SHA
    0e6650e View commit details
Showing with 26 additions and 13 deletions.
  1. +6 −1 doc/gp4-hdl.tex
  2. +20 −12 src/gp4par/main.cpp
7 changes: 6 additions & 1 deletion doc/gp4-hdl.tex
Original file line number Diff line number Diff line change
@@ -4249,7 +4249,7 @@ \section{\namestyle{gp4par} Command Line Usage}

\subsection{Introduction}

The current version of \namestyle{gp4par} takes long-form arguments only. All argument and value names are case sensitive.
All argument and value names are case sensitive.

The example shown in figure \ref{gp-cmd-example} runs place-and-route on the netlist Analog.json, targeting the
SLG46620V, with top-level module Analog, and saves the generated bitstream to Analog-hdl.txt. Unused pins are pulled
@@ -4319,6 +4319,11 @@ \subsection{\texttt{--logfile-lines}, \texttt{-L}}
\texttt{--logfile}, except that the file is line-buffered, that is every message is written to the file as soon
as it is completely emitted by \namestyle{gp4par}.

\subsection{\texttt{--nocolors}}

The \texttt{--nocolors} argument is optional. If set, do not use ANSI color escape sequences in stdout (logfiles never use
colors). This is primarily intended for automated batch flows which do filtering of messages.

\subsection{\texttt{--output}, \texttt{-o}}

The \texttt{--output} argument is required for all place-and-route operations. It must be immediately followed by the
32 changes: 20 additions & 12 deletions src/gp4par/main.cpp
Original file line number Diff line number Diff line change
@@ -46,6 +46,9 @@ int main(int argc, char* argv[])
//Turns off the internal LDO and connects Vdd directly to Vcore
bool ldoBypass = false;

//Disables colored output
bool noColors = false;

//Number of times to re-try the boot process
int bootRetry = 1;

@@ -88,13 +91,13 @@ int main(int argc, char* argv[])
unused_pull = Greenpak4IOB::PULL_NONE;
else
{
printf("--unused-pull must be one of up, down, float, none\n");
printf("ERROR: --unused-pull must be one of up, down, float, none\n");
return 1;
}
}
else
{
printf("--unused-pull requires an argument\n");
printf("ERROR: --unused-pull requires an argument\n");
return 1;
}
}
@@ -111,13 +114,13 @@ int main(int argc, char* argv[])
unused_drive = Greenpak4IOB::PULL_1M;
else
{
printf("--unused-drive must be one of 10k, 100k, 1M\n");
printf("ERROR: --unused-drive must be one of 10k, 100k, 1M\n");
return 1;
}
}
else
{
printf("--unused-drive requires an argument\n");
printf("ERROR: --unused-drive requires an argument\n");
return 1;
}
}
@@ -127,7 +130,7 @@ int main(int argc, char* argv[])
sscanf(argv[++i], "%x", &userid);
else
{
printf("--usercode requires an argument\n");
printf("ERROR: --usercode requires an argument\n");
return 1;
}
}
@@ -153,13 +156,13 @@ int main(int argc, char* argv[])
break;

default:
printf("invalid part (supported: 46620, 46621, 46140)\n");
printf("ERROR: Invalid part (supported: SLG46620, SLG46621, SLG46140)\n");
return 1;
}
}
else
{
printf("--part requires an argument\n");
printf("ERROR: --part requires an argument\n");
return 1;
}
}
@@ -171,13 +174,15 @@ int main(int argc, char* argv[])
disableChargePump = true;
else if(s == "--ldo-bypass")
ldoBypass = true;
else if(s == "--nocolors")
noColors = true;
else if(s == "--boot-retry")
{
if(i+1 < argc)
bootRetry = atoi(argv[++i]);
else
{
printf("--boot-retry requires an argument\n");
printf("ERROR: --boot-retry requires an argument\n");
return 1;
}
}
@@ -187,7 +192,7 @@ int main(int argc, char* argv[])
ofname = argv[++i];
else
{
printf("--output requires an argument\n");
printf("ERROR: --output requires an argument\n");
return 1;
}
}
@@ -197,7 +202,7 @@ int main(int argc, char* argv[])
pcfname = argv[++i];
else
{
printf("--constraints requires an argument\n");
printf("ERROR: --constraints requires an argument\n");
return 1;
}
}
@@ -208,7 +213,7 @@ int main(int argc, char* argv[])

else
{
printf("Unrecognized command-line argument \"%s\", use --help\n", s.c_str());
printf("ERROR: Unrecognized command-line argument \"%s\", use --help\n", s.c_str());
return 1;
}
}
@@ -221,7 +226,10 @@ int main(int argc, char* argv[])
}

//Set up logging
g_log_sinks.emplace(g_log_sinks.begin(), new ColoredSTDLogSink(console_verbosity));
if(noColors)
g_log_sinks.emplace(g_log_sinks.begin(), new STDLogSink(console_verbosity));
else
g_log_sinks.emplace(g_log_sinks.begin(), new ColoredSTDLogSink(console_verbosity));

//Print header
if(console_verbosity >= Severity::NOTICE)