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

Commits on May 22, 2017

  1. Copy the full SHA
    1a06c93 View commit details
  2. doc: fixed typo

    azonenberg committed May 22, 2017
    Copy the full SHA
    29847cd View commit details
  3. Copy the full SHA
    c035733 View commit details
Showing with 16 additions and 10 deletions.
  1. +1 −1 doc/gp4-hdl.tex
  2. +12 −5 src/gp4par/make_graphs.cpp
  3. +2 −3 src/greenpak4/Greenpak4Counter.cpp
  4. +1 −1 src/greenpak4/Greenpak4Counter.h
2 changes: 1 addition & 1 deletion doc/gp4-hdl.tex
Original file line number Diff line number Diff line change
@@ -219,7 +219,7 @@ \subsection{\namestyle{gp4par} Device Limitations}

\begin{itemize}
\item Counters: Delay, edge detector, PWM, wake-sleep mode, counter cascading.
All clock sources other than on-chip oscillator. Pre-divider value of 12.
All clock sources other than on-chip oscillators. Pre-divider value of 12.
\item ADC
\item DAC: Inputs from DCMP.
\item Wake-Sleep
17 changes: 12 additions & 5 deletions src/gp4par/make_graphs.cpp
Original file line number Diff line number Diff line change
@@ -553,28 +553,35 @@ void MakeDeviceNodes(
//Decide on primary label
if(counter->GetDepth() == 14)
{
if(counter->HasFSM()) {
if(counter->HasFSM())
{
auto node = MakeNode(count14_adv_label, counter, dgraph);

//It's legal to map a COUNT8 or a COUNT14 to a COUNT14_ADV site, so add that as an alternate.
//It's not legal to map a COUNT8_ADV to a COUNT14_ADV site because they have different behavior
//when counting up.
node->AddAlternateLabel(count8_label);
node->AddAlternateLabel(count14_label);
} else {
}
else
{
auto node = MakeNode(count14_label, counter, dgraph);

//It's legal to map a COUNT8 to a COUNT14 site, so add that as an alternate
node->AddAlternateLabel(count8_label);
}
}
else {
if(counter->HasFSM()) {
else
{
if(counter->HasFSM())
{
auto node = MakeNode(count8_adv_label, counter, dgraph);

//It's legal to map a COUNT8 to a COUNT8_ADV site, so add that as an alternate.
node->AddAlternateLabel(count8_label);
} else {
}
else
{
MakeNode(count8_label, counter, dgraph);
}
}
5 changes: 2 additions & 3 deletions src/greenpak4/Greenpak4Counter.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***********************************************************************************************************************
* Copyright (C) 2016 Andrew Zonenberg and contributors *
* Copyright (C) 2017 Andrew Zonenberg and contributors *
* *
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General *
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) *
@@ -289,7 +289,6 @@ bool Greenpak4Counter::Save(bool* bitstream)
}

//RC oscillator
//TODO: 12 is a legal value for some counters but not others, need to consider this during placement??
else if(dynamic_cast<Greenpak4RCOscillator*>(clk) != NULL)
{
switch(m_preDivide)
@@ -337,7 +336,7 @@ bool Greenpak4Counter::Save(bool* bitstream)
default:
LogError(
"Counter %d does not support pre-divider values other than 1/4/12/24/64 "
"when clocked by ring osc\n",
"when clocked by RC osc\n",
m_countnum);
return false;
}
2 changes: 1 addition & 1 deletion src/greenpak4/Greenpak4Counter.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/***********************************************************************************************************************
* Copyright (C) 2016 Andrew Zonenberg and contributors *
* Copyright (C) 2017 Andrew Zonenberg and contributors *
* *
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General *
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) *