O sinal pronto tem que estar ativo no final e a saída x tem que ter o valor que foi definido nos testes.
Sugiro criar uma planilha no google sheets e depois por os dados no teste.
Testado com este ghdl:
GHDL 0.36 (v0.36) [Dunoon edition]
Compiled with GNAT Version: 9.2.0
GCC back-end code generator
Written by Tristan Gingold.
Por todos os arquivos no mesmo diretório com o arquivo formula.vhd
Pode-se editar os parâmetros no .vht
(linha 39):
-- constants
constant SIZE: natural := 32;
(linha 96):
constant valores_esperados : valores_esperados_array :=
(
(12, 8, 24),
(2, -2, 4),
(1, 4, 4),
(-3, 7, 6),
(8, 8, 16),
(-3, -3, 6)
);
Para compilar, basta rodar o make:
$ make
ghdl -a formula.vhd
ghdl -a formula_testbench.vht
ghdl -e formula_testbench
Basta rodar make test e ver o resultado. Obs: para sair é só dar Interrupt, i.e. Ctrl + C.
$ make test
formula_testbench.vht:110:8:@0ms:(report note): INICIO DO TESTE...
formula_testbench.vht:112:16:@0ms:(report note): TESTANDO PARA:
a = 12
b = 8
formula_testbench.vht:141:24:@240ns:(report note): TEST OK
formula_testbench.vht:112:16:@240ns:(report note): TESTANDO PARA:
a = 2
b = -2
formula_testbench.vht:141:24:@480ns:(report note): TEST OK
formula_testbench.vht:112:16:@480ns:(report note): TESTANDO PARA:
a = 1
b = 4
formula_testbench.vht:141:24:@720ns:(report note): TEST OK
formula_testbench.vht:112:16:@720ns:(report note): TESTANDO PARA:
a = -3
b = 7
formula_testbench.vht:141:24:@960ns:(report note): TEST OK
formula_testbench.vht:112:16:@960ns:(report note): TESTANDO PARA:
a = 8
b = 8
formula_testbench.vht:141:24:@1200ns:(report note): TEST OK
formula_testbench.vht:112:16:@1200ns:(report note): TESTANDO PARA:
a = -3
b = -3
formula_testbench.vht:141:24:@1440ns:(report note): TEST OK
formula_testbench.vht:144:8:@1440ns:(report note): FIM DO TESTE!
^Cmake: *** [Makefile:12: test] Interrupt