Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 8x 8x | import {stde} from '../stde';
class Mux extends stde {
constructor(in_count: number, preffix_address?: string, preffix_digital?: string) {
let ind_count = in_count^2;
super(
'MUX',
[
...Array.from({length: in_count}, (_, index) =>
preffix_address ? preffix_address : 'A_' + String(index + 1)
),
...Array.from({length: ind_count}, (_, index) =>
preffix_digital ? preffix_digital : 'D_' + String(index + 1)
)
],
['out_1'],
(a) => {
return a;
}
);
}
}
function mux(in_count: number, preffix_address?: string, preffix_digital?: string) {
return new Mux(in_count, preffix_address, preffix_digital);
}
export {Mux, mux}; |