Изобретение относитс к вычисли тельной технике и может быть испол зовано дл решени веро тностных задач методом моделировани . .Известен .генератор псевдослучай ной последовательности двоичных чисел, содержащий регистр сдвига с сумматором по модулю 2 в цепи обратной св зи, генератор тактовых импульсов, выход которого соединен со входом регистра сдвига, а также счетчик и блок сумматоров 11 Недостатком данного устройства вл етс малое значение периода пс дослучайной последовательности, ог- раниченное разр дностью регистра сдвига. Увеличение периода последовательности , за счет разр дности регистра приводит к усложнению схемы и снижению её надежности. Наиболее близким по техническому решению к изобретению вл етс гене ратор псевдослучайной последователь ности, содержащий тактовый генератор , счетчик импульсов, блок пам ти и сумматор по модулю 2. В данной схеме работа, выполн ема блоком пам ти, аналогична работе многоразр дного регистра сдвига. За счет увеличени объема пам ти длина генерируемой последовательности увеличиваетс без значительного усложнени схемы C2j. Недостатком известного устройства вл етс сложность изменени характеристик генерируемой псевдослучайной последовательности. Изменение последовательности возможно за счет изменени временного сдвига мезхду сигналами на входах сумматора по модулю 2 путем увеличени или уменьшени разр дности регистра сдвига. Однако это приводит к изменению общего числа разр дов генератора и св зано со значительным изменением схемы. Цель изобретени - расширение функционировани возможностей генератора за счет обеспечени изменени характеристик формируемой последовательности . Дл достижени поставленной цели в генератор псевдослучайной последовательности , содержащий генератор тактовых импульсов, счетчик, сумматор по модулю два, выход которого соединен с инфЬрмационным входом блока пам ти, введены коммутатор , параллельный сумматор, два D-триггера, Т-триггер, два элемента И и элемент ИЛИ, выход которого соединен с управл ющим входом блока пам ти, выход которого соединен с D-входами D-триггеров, выходы которых соединены со входами сумматора по модулю два соответственно, выход генератора .тактовых импульсов соединен со входом Т-триггера и с первыми входами первого и второго элементов И, выходы которых соединены с С-входами соответствующих D-триггеров, пр мой выход Т-триггера соединен с управл ющим входом коммутатора, с первым входом элемента ИЛИ и со вторым входом первого элемента И, выход которого соединен со счетным входом счетчика, разр дные выходы которого соединены с первой группой входов параллельного сумматора соответственно, выходы которого соединены с соответствующими адресными входами блока пам ти , инверсный выход Т-триггера соединен со вторым входом второго элемента И, выход которого соединен со вторым входом элемента ИЛИ, выход второго D-триггера вл етс выходом генератора, группой входов которого вл етс группа входов коммутатора , группа выходов которого соединена со второй группой входов параллельного cyMNfaTopa соответственно. На фиг. 1 дана блок-схема генератора; на фиг. 2 - диаграмма его работы. Генератор псевдослучайной последовательности содержит генератор 1 тактовых импульсов, Т-триггер 2f элементы ИЗ, элемент ИЛИ 4, блок 5 пам ти, параллельный сумматор 6, счетчик 7, коммутатор 8, D-триггеры 9 и сумматор 10 по модулю два. Генератор работает следующим образом . Сигнал f с выхода генератора 1 поступает на вход триггера2 и элементы И 3. На пр мом и инверсном выходах триггера 2 формируютс сигналы Q и 9 формы меандр (фиг. 2), а на выходах элементов И 3 - несовпадающие последовательности импульсов V|, и V (фиг. 2) с частотой ,-1 Каждый импульс сигнала V , поступающий на вход счетчика 7, увеличиваетс на код М на его.разр дных выходах , соединенных со входами первого слагаемого параллельного сумматора 6. При досто нии Q 1 коммутатором 8 подключаетс ко всем входам второго слагаемого ксэдовый сигнал логического нул . Сумматор 6 формирует на адресных шинах блока пам ти 5 код М, определ ющий адрес опрашиваемой чейки пам ти. Элемент ИЛИ, формирующий сигнал V Q V V/j, воздейству на вход управлени режимом работы блока 5 пам ти, устанавливает блок пам ти в режим считывани , и в первый D-триггер 9 сигналом переписываетс содержимое чейки пам ти с адресом М. С приходом следующего импульса f триггер 2 переходит в состо ние Q О, коммутатор 8 подключает ко входам вто- Е{ого слагаемого сумматора 6 управл ющий кодовый сигнал N. Сумматор 6 формирует на -адресных шинах блока 5 пам ти, работающего пр-преж нему в режиме считывани , код М + N и во; второй D-TpHrj ep 9 сигналом переписываетс содержимое чейки пам ти М + N. На входах сумматора по модулю 2 формируетс двоичное число , определ емое состо нием D-триггеров 9, По окончании импульса V на выходе элемента ИЛИ 4 формируетс сигнал V о; блок 5 пам ти переводитс в режим записи, происходит запись числа с выхода сумматора по модулю 2 в чейку пам ти-с номером М + N.The invention relates to a computational technique and can be used to solve probabilistic problems by the simulation method. A pseudo-random binary number generator is known that contains a shift register with a modulo 2 adder in a feedback circuit, a clock generator whose output is connected to the input of the shift register, and a counter and block of adders 11 The disadvantage of this device is a small value period ps of a random sequence, limited by the size of the shift register. An increase in the sequence period due to the register size leads to a complication of the circuit and a decrease in its reliability. The closest technical solution to the invention is a pseudo-random sequence generator containing a clock generator, a pulse counter, a memory unit, and a modulo-2 adder. In this scheme, the work performed by the memory unit is similar to that of a multi-bit shift register. By increasing the memory capacity, the length of the generated sequence is increased without significantly complicating the C2j scheme. A disadvantage of the known device is the complexity of changing the characteristics of the generated pseudo-random sequence. The sequence can be changed by changing the time shift of the mezhd with signals at the inputs of the modulo 2 adder by increasing or decreasing the shift register bit size. However, this leads to a change in the total number of generator bits and is associated with a significant change in the circuit. The purpose of the invention is to enhance the functionality of the generator by providing changes in the characteristics of the generated sequence. To achieve this goal, a pseudo-random sequence generator containing a clock, a counter, a modulo-two adder, the output of which is connected to the memory input of a memory unit, a switch, a parallel adder, two D-flip-flops, a T-flip-flop, two AND elements, and the OR element, the output of which is connected to the control input of the memory unit, the output of which is connected to the D-inputs of D-flip-flops, the outputs of which are connected to the inputs of the modulo-two, respectively, the output of the generator of tact pulses It is connected with the input of the T-flip-flop and with the first inputs of the first and second And elements, the outputs of which are connected to the C-inputs of the corresponding D-flip-flops, the direct output of the T-flip-flop is connected to the control input of the switch, to the first input of the OR element and to the second input the first element And, the output of which is connected to the counting input of the counter, the bit outputs of which are connected to the first group of inputs of the parallel adder, respectively, the outputs of which are connected to the corresponding address inputs of the memory unit, the inverse output T of the flip-flop with one with a second input of the second AND gate, whose output is connected to the second input of the OR gate, the output of the second D-flip-flop is the output of the generator, which group of inputs is a group switch input group whose output is connected to a second group of parallel inputs cyMNfaTopa respectively. FIG. 1 is given a block diagram of the generator; in fig. 2 is a diagram of his work. The pseudo-random sequence generator contains 1 clock pulse generator, T-flip-flop 2f elements IZ, element OR 4, memory block 5, parallel adder 6, counter 7, switch 8, D-flip-flops 9 and modulator 10. The generator works as follows. The signal f from the output of the generator 1 is fed to the input of the trigger 2 and the elements of AND 3. At the direct and inverse outputs of the trigger 2, the signals Q and 9 of the shape of the square wave are formed (Fig. 2), and at the outputs of the elements of the 3 are mismatched pulse sequences V | V (Fig. 2) with a frequency, -1 Each pulse of the signal V, fed to the input of counter 7, is incremented by a code M at its discharge outputs connected to the inputs of the first term of the parallel adder 6. At Q 1, switch 8 connects to all inputs of the second term, the csed signal of the logical well . The adder 6 generates on the address buses of the memory block 5 a code M defining the address of the polled memory cell. The OR element, which forms the VQVV / j signal, acts on the control input of the memory block 5, sets the memory block to read mode, and the contents of the memory cell with the address M are copied to the first D flip-flop 9 with a signal M. With the arrival of the next pulse f the trigger 2 goes to the QO state, the switch 8 connects the control code signal N to the inputs of the second E {st component of the adder 6. The adder 6 generates, on the -address buses of the memory block 5, which is still in read mode, the code M + N and in; the second D-TpHrj ep 9 signal rewrites the contents of memory cell M + N. At the inputs of the modulo 2 adder, a binary number is generated, determined by the state of D-flip-flops 9. At the end of the pulse V, the output of the element OR 4 forms the signal V o; memory block 5 is transferred to the recording mode, the number from the output of the modulo 2 adder is written into the memory cell with the number M + N.
Во врем работы счетчик 7 проходит все К своих возможных состо ний число которых равно объему пам ти и блока 5 пам ти, и число, записанное в каждую i- чейку пам ти, считываетс на вход первого D-триггера 9 чеtie3 К - N периодовсигнала V , а на вход второго D-триггера 9 - через . К периодов. В результате работа, выполн ема блоком 5 пам ти, аналогична работе К-разр дного регистра сдвига, охваченного обратной св зью через сумматор по модулю 2, подключенный своими входами к последнему. (k-му) ,. и К - N-му разр дам регистра . За счет изменени регулирующей кодовой комбинации на входах коммутатора 8 может быть изменен номер разр да эквивалентного регистра сдвига , к которому подключен полусумматор .During operation, counter 7 passes all K of its possible states, the number of which is equal to the memory volume and memory block 5, and the number written in each memory cell i is read to the input of the first D flip-flop 9 chip 3 K - N of the V signal , and to the input of the second D-flip-flop 9 - through. By periods. As a result, the work performed by memory block 5 is similar to the operation of a K-bit shift register covered by feedback through a modulo-2 adder connected by its inputs to the latter. (k-th),. and K - N-th register dam. By changing the control code combination at the inputs of the switch 8, the bit number of the equivalent shift register to which the half adder is connected can be changed.
Таким образом, генератор псевдослучайной последовательности позвол ет получить все возможные последовательности при выбранном объеме пам ти . При этом изменение, длины генерируемой последовательности не св зано с изменением схемы устройства и увеличением аппаратурных затрат.Thus, a pseudo-random sequence generator allows to obtain all possible sequences for a selected memory size. In this case, the change in the length of the generated sequence is not associated with a change in the device circuit and an increase in hardware costs.
Фиг,2FIG 2