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

Commits on Aug 9, 2017

  1. Copy the full SHA
    2964068 View commit details
  2. Copy the full SHA
    2c7cdfa View commit details
  3. Copy the full SHA
    aef4e0d View commit details
Showing with 64 additions and 0 deletions.
  1. +10 −0 src/greenpak4/Greenpak4PairedEntity.cpp
  2. +3 −0 src/greenpak4/Greenpak4PairedEntity.h
  3. +50 −0 tests/greenpak4/slg46620v/Adder.v
  4. +1 −0 tests/greenpak4/slg46620v/CMakeLists.txt
10 changes: 10 additions & 0 deletions src/greenpak4/Greenpak4PairedEntity.cpp
Original file line number Diff line number Diff line change
@@ -114,6 +114,16 @@ string Greenpak4PairedEntity::GetPrimitiveName() const
return GetActiveEntity()->GetPrimitiveName();
}

map<string, string> Greenpak4PairedEntity::GetParameters() const
{
return GetActiveEntity()->GetParameters();
}

map<string, string> Greenpak4PairedEntity::GetAttributes() const
{
return GetActiveEntity()->GetAttributes();
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Module selection

3 changes: 3 additions & 0 deletions src/greenpak4/Greenpak4PairedEntity.h
Original file line number Diff line number Diff line change
@@ -49,6 +49,9 @@ class Greenpak4PairedEntity : public Greenpak4BitstreamEntity
virtual std::vector<std::string> GetInputPorts() const;
virtual std::vector<std::string> GetOutputPorts() const;

virtual std::map<std::string, std::string> GetParameters() const;
virtual std::map<std::string, std::string> GetAttributes() const;

virtual bool CommitChanges();

Greenpak4BitstreamEntity* GetEntity(std::string type)
50 changes: 50 additions & 0 deletions tests/greenpak4/slg46620v/Adder.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/***********************************************************************************************************************
* 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) *
* any later version. *
* *
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for *
* more details. *
* *
* You should have received a copy of the GNU Lesser General Public License along with this program; if not, you may *
* find one here: *
* https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt *
* or you may search the http://www.gnu.org website for the version 2.1 license, or you may write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA *
**********************************************************************************************************************/

`default_nettype none

/**
TODO
*/
module Adder(din_a, din_b, dout, xorin, xorout);

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// I/O declarations

(* LOC = "P20 P19 P18 P17" *)
input wire[3:0] din_a;

(* LOC = "P16 P15 P14 P13" *)
input wire[3:0] din_b;

(* LOC = "P3 P4 P5 P6" *)
output wire[3:0] dout;

(* LOC = "P7 P8" *)
input wire[1:0] xorin;

(* LOC = "P9" *)
output wire xorout;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// The adder

assign dout = din_a + din_b;
assign xorout = ^xorin;

endmodule
1 change: 1 addition & 0 deletions tests/greenpak4/slg46620v/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
########################################################################################################################
# Bitstreams that are not (yet) part of a HiL test

add_greenpak4_bitstream(Adder SLG46620V)
add_greenpak4_bitstream(Blinky SLG46620V)
add_greenpak4_bitstream(Count12 SLG46620V)
add_greenpak4_bitstream(Dac SLG46620V)