forked from steveicarus/iverilog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure VPI release on net connected to island returns correct value.
- Loading branch information
1 parent
8d2149f
commit 97c6339
Showing
7 changed files
with
31 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2008-2010,2012 Stephen Williams ([email protected]) | ||
* Copyright (c) 2008-2015 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -217,9 +217,12 @@ void vvp_island_port::recv_vec8_pv(vvp_net_ptr_t, const vvp_vector8_t&bit, | |
island_->flag_island(); | ||
} | ||
|
||
void vvp_island_port::force_flag(void) | ||
void vvp_island_port::force_flag(bool run_now) | ||
{ | ||
island_->flag_island(); | ||
if (run_now) | ||
island_->run_island(); | ||
else | ||
island_->flag_island(); | ||
} | ||
|
||
vvp_island_branch::~vvp_island_branch() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#ifndef IVL_vvp_island_H | ||
#define IVL_vvp_island_H | ||
/* | ||
* Copyright (c) 2008-2014 Stephen Williams ([email protected]) | ||
* Copyright (c) 2008-2015 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -137,8 +137,10 @@ class vvp_island_port : public vvp_net_fun_t { | |
|
||
// This is painful, but necessary. If the island is connected | ||
// to a forced net, we need to rerun the calculations whenever | ||
// a force/release happens to the net. | ||
virtual void force_flag(void); | ||
// a force/release happens to the net. If run_now is true, we | ||
// rerun immediately, otherwise we schedule it for the end of | ||
// the current time slot. | ||
virtual void force_flag(bool run_now); | ||
|
||
public: | ||
vvp_vector8_t invalue; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2004-2014 Stephen Williams ([email protected]) | ||
* Copyright (c) 2004-2015 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -3305,7 +3305,7 @@ void vvp_net_fun_t::recv_object(vvp_net_ptr_t, vvp_object_t, vvp_context_t) | |
assert(0); | ||
} | ||
|
||
void vvp_net_fun_t::force_flag(void) | ||
void vvp_net_fun_t::force_flag(bool) | ||
{ | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#ifndef IVL_vvp_net_H | ||
#define IVL_vvp_net_H | ||
/* | ||
* Copyright (c) 2004-2014 Stephen Williams ([email protected]) | ||
* Copyright (c) 2004-2015 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -1221,11 +1221,11 @@ class vvp_net_fun_t { | |
virtual void recv_long_pv(vvp_net_ptr_t port, long bit, | ||
unsigned base, unsigned wid); | ||
|
||
// This method is called when the net it forced or | ||
// This method is called when the net is forced or | ||
// released. This is very rarely needed; island ports use it | ||
// to know that the net is being forced and that it needs to | ||
// do something about it. | ||
virtual void force_flag(void); | ||
virtual void force_flag(bool run_now); | ||
|
||
public: // These objects are only permallocated. | ||
static void* operator new(std::size_t size) { return heap_.alloc(size); } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2004-2014 Stephen Williams ([email protected]) | ||
* Copyright (c) 2004-2015 Stephen Williams ([email protected]) | ||
* | ||
* This source code is free software; you can redistribute it | ||
* and/or modify it in source code form under the terms of the GNU | ||
|
@@ -121,23 +121,23 @@ void vvp_net_t::force_vec4(const vvp_vector4_t&val, vvp_vector2_t mask) | |
{ | ||
assert(fil); | ||
fil->force_fil_vec4(val, mask); | ||
fun->force_flag(); | ||
fun->force_flag(false); | ||
vvp_send_vec4(out_, val, 0); | ||
} | ||
|
||
void vvp_net_t::force_vec8(const vvp_vector8_t&val, vvp_vector2_t mask) | ||
{ | ||
assert(fil); | ||
fil->force_fil_vec8(val, mask); | ||
fun->force_flag(); | ||
fun->force_flag(false); | ||
vvp_send_vec8(out_, val); | ||
} | ||
|
||
void vvp_net_t::force_real(double val, vvp_vector2_t mask) | ||
{ | ||
assert(fil); | ||
fil->force_fil_real(val, mask); | ||
fun->force_flag(); | ||
fun->force_flag(false); | ||
vvp_send_real(out_, val, 0); | ||
} | ||
|
||
|