Skip to content

Commit

Permalink
Add -o option to gtkwave invocation when waveform type is VCD
Browse files Browse the repository at this point in the history
It optimizes things out, and it's specially useful for large and
complex projects.
  • Loading branch information
machitgarha committed Mar 28, 2023
1 parent 5eb070e commit 3289df5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class Application extends \Symfony\Component\Console\Application
{
public const NAME = "Parvaj";
public const VERSION = "0.3.2";
public const VERSION = "0.4.0-alpha.1";

public function __construct()
{
Expand Down
3 changes: 3 additions & 0 deletions src/Runner/Ghdl/GhdlRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ public function analyze(array $unitFilePaths): void
))->run();
}

/**
* @todo Remove VCD file after this step, because of being huge in size.
*/
public function elabRun(string $testEntityName, ElabRunUserOptions $userOptions): string
{
(new Process(
Expand Down
8 changes: 8 additions & 0 deletions src/Runner/Gtkwave/GtkwaveRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace MAChitgarha\Parvaj\Runner\Gtkwave;

use MAChitgarha\Parvaj\Runner\OptionBuilder;

use MAChitgarha\Parvaj\WaveformType;

use MAChitgarha\Parvaj\Util\Process;
Expand All @@ -15,9 +17,15 @@ public function __construct(

public function open(string $waveformFilePath, string $waveformType): void
{
$options = [];
if ($waveformType === WaveformType::VCD) {
$options["o"] = null;
}

(new Process(
[
$this->executable,
...OptionBuilder::build($options),
$waveformFilePath,
]
))->run();
Expand Down

0 comments on commit 3289df5

Please sign in to comment.