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/yosys
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5fd9c2a0f87b
Choose a base ref
...
head repository: azonenberg/yosys
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6b7c58563158
Choose a head ref
  • 5 commits
  • 3 files changed
  • 2 contributors

Commits on Aug 28, 2017

  1. Reformatted GP_COUNTx_ADV resets to avoid Yosys thinking that they're…

    … multi-edge-sensitive and getting confused.
    azonenberg committed Aug 28, 2017
    Copy the full SHA
    c314586 View commit details

Commits on Aug 30, 2017

  1. Copy the full SHA
    8530333 View commit details
  2. Merge pull request YosysHQ#397 from azonenberg/gpak-libfixes

    Reformatted GP_COUNTx_ADV resets to avoid Yosys thinking that they're…
    cliffordwolf authored Aug 30, 2017
    Copy the full SHA
    c0034f5 View commit details
  3. Copy the full SHA
    9114474 View commit details
  4. Copy the full SHA
    6b7c585 View commit details
Showing with 54 additions and 34 deletions.
  1. +16 −0 kernel/rtlil.cc
  2. +4 −0 kernel/rtlil.h
  3. +34 −34 techlibs/greenpak4/cells_sim_digital.v
16 changes: 16 additions & 0 deletions kernel/rtlil.cc
Original file line number Diff line number Diff line change
@@ -234,6 +234,22 @@ pool<string> RTLIL::AttrObject::get_strpool_attribute(RTLIL::IdString id) const
return data;
}

void RTLIL::AttrObject::set_src_attribute(const std::string &src)
{
if (src.empty())
attributes.erase("\\src");
else
attributes["\\src"] = src;
}

std::string RTLIL::AttrObject::get_src_attribute() const
{
std::string src;
if (attributes.count("\\src"))
src = attributes.at("\\src").decode_string();
return src;
}

bool RTLIL::Selection::selected_module(RTLIL::IdString mod_name) const
{
if (full_selection)
4 changes: 4 additions & 0 deletions kernel/rtlil.h
Original file line number Diff line number Diff line change
@@ -505,9 +505,13 @@ struct RTLIL::AttrObject

void set_bool_attribute(RTLIL::IdString id);
bool get_bool_attribute(RTLIL::IdString id) const;

void set_strpool_attribute(RTLIL::IdString id, const pool<string> &data);
void add_strpool_attribute(RTLIL::IdString id, const pool<string> &data);
pool<string> get_strpool_attribute(RTLIL::IdString id) const;

void set_src_attribute(const std::string &src);
std::string get_src_attribute() const;
};

struct RTLIL::SigChunk
68 changes: 34 additions & 34 deletions techlibs/greenpak4/cells_sim_digital.v
Original file line number Diff line number Diff line change
@@ -147,7 +147,15 @@ module GP_COUNT14_ADV(input CLK, input RST, output reg OUT,
"RISING": begin
always @(posedge CLK, posedge RST) begin

if(KEEP) begin
//Resets
if(RST) begin
if(RESET_VALUE == "ZERO")
count <= 0;
else
count <= COUNT_TO;
end

else if(KEEP) begin
end
else if(UP) begin
count <= count + 1'd1;
@@ -161,21 +169,21 @@ module GP_COUNT14_ADV(input CLK, input RST, output reg OUT,
count <= COUNT_TO;
end

end
end

"FALLING": begin
always @(posedge CLK, negedge RST) begin

//Resets
if(RST) begin
if(!RST) begin
if(RESET_VALUE == "ZERO")
count <= 0;
else
count <= COUNT_TO;
end

end
end

"FALLING": begin
always @(posedge CLK, negedge RST) begin

if(KEEP) begin
else if(KEEP) begin
end
else if(UP) begin
count <= count + 1'd1;
@@ -189,14 +197,6 @@ module GP_COUNT14_ADV(input CLK, input RST, output reg OUT,
count <= COUNT_TO;
end

//Resets
if(!RST) begin
if(RESET_VALUE == "ZERO")
count <= 0;
else
count <= COUNT_TO;
end

end
end

@@ -286,8 +286,16 @@ module GP_COUNT8_ADV(input CLK, input RST, output reg OUT,
"RISING": begin
always @(posedge CLK, posedge RST) begin

//Resets
if(RST) begin
if(RESET_VALUE == "ZERO")
count <= 0;
else
count <= COUNT_TO;
end

//Main counter
if(KEEP) begin
else if(KEEP) begin
end
else if(UP) begin
count <= count + 1'd1;
@@ -301,22 +309,22 @@ module GP_COUNT8_ADV(input CLK, input RST, output reg OUT,
count <= COUNT_TO;
end

end
end

"FALLING": begin
always @(posedge CLK, negedge RST) begin

//Resets
if(RST) begin
if(!RST) begin
if(RESET_VALUE == "ZERO")
count <= 0;
else
count <= COUNT_TO;
end

end
end

"FALLING": begin
always @(posedge CLK, negedge RST) begin

//Main counter
if(KEEP) begin
else if(KEEP) begin
end
else if(UP) begin
count <= count + 1'd1;
@@ -330,14 +338,6 @@ module GP_COUNT8_ADV(input CLK, input RST, output reg OUT,
count <= COUNT_TO;
end

//Resets
if(!RST) begin
if(RESET_VALUE == "ZERO")
count <= 0;
else
count <= COUNT_TO;
end

end
end