public void Replace(LibraryGateReplaceRequest replaceRequest)
        {
            _netlistDataBuilder.Build(replaceRequest.SourceNetlist);
            _netlistCloner.Clone(replaceRequest.SourceNetlist, replaceRequest.TargetNetlist);

            _libraryGateReplacer.Replace(replaceRequest.TargetNetlist, replaceRequest.GateToReplace, replaceRequest.NewGate, replaceRequest.PortsMapping);

            var content = _netlistFileContentDirector.Construct(replaceRequest.TargetNetlist);

            _fileWriter.Write(replaceRequest.TargetNetlist, "Replace Library Gate", content);
        }
示例#2
0
        public void PortsToUpper(UpperCasePortsRequest request)
        {
            _netlistDataBuilder.Build(request.SourceNetlist);
            _netlistCloner.Clone(request.SourceNetlist, request.TargetNetlist);

            _libraryGatesPortsReplacer.PortsToUpper(request.TargetNetlist);

            var content = _netlistFileContentDirector.Construct(request.TargetNetlist);

            _fileWriter.Write(request.TargetNetlist, "Uppercase Library Gates Ports", content);
        }
        public void Remove(RemoveBufferRequest removeBufferRequest)
        {
            _netlistDataBuilder.Build(removeBufferRequest.SourceNetlist);
            _netlistCloner.Clone(removeBufferRequest.SourceNetlist, removeBufferRequest.TargetNetlist);

            _bufferRemover.Remove(removeBufferRequest.TargetNetlist, removeBufferRequest.BufferName, removeBufferRequest.InputPort, removeBufferRequest.OutputPort);

            var content = _netlistFileContentDirector.Construct(removeBufferRequest.TargetNetlist);

            _fileWriter.Write(removeBufferRequest.TargetNetlist, "Remove Buffers", content);
        }
示例#4
0
        public void Remove_NetlistExists_RemoveNetlist()
        {
            _netlistCloner.Clone(ExampleNetlistFilePath, DummyNetlist);

            _target.Remove(DummyNetlist);

            var netlist = _netlistRepository.Get(DummyNetlist);

            Assert.That(netlist, Is.Null);

            var modules = _moduleRepository.GetAll(DummyNetlist);

            Assert.That(modules, Is.Empty);

            var instances = _instanceRepository.GetBy(DummyNetlist);

            Assert.That(instances, Is.Empty);
        }
示例#5
0
 public void Clone_SourceNetlistNotExists_ThrowsInvalidOperationException()
 {
     Assert.Throws <InvalidOperationException>(() => _target.Clone(DummyNetlist, NewDummyNetlist));
 }